simonw / git-history

Tools for analyzing Git history using SQLite
Apache License 2.0
191 stars 18 forks source link

Create a view that joins against commits to get the date #19

Closed simonw closed 2 years ago

simonw commented 3 years ago

Browsing and querying item_version is a lot more interesting if there's a date column, which currently requires a manual join. A SQL view can fix this (at least within Datasette).

simonw commented 2 years ago
create view item_version_detail as select
  commits.commit_at as _commit_at,
  item_version.*
from
  item_version
  join commits on commits.id = item_version._commit