simonw / git-history

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

Support for a single value input file #17

Open rdmurphy opened 3 years ago

rdmurphy commented 3 years ago

Hello! This is great. I have an example repo that is set up in a way that seems mostly compatible with this but tracks a single value in a .txt file. I'm sure I could use the custom converter to pull this off, but does this sound like a format that'd make sense to be supported by default?

simonw commented 3 years ago

Oh what an interesting example! I'm not sure this is common enough to warrant a feature, but adding an example --convert pattern to the documentation could help better demonstrate that feature. I'll have a play!

simonw commented 3 years ago

It is a bit awkward- this seems to work:

% git-history file actblue.db sitewide_raised_amount.txt --convert '[{"id": 1, "value": int(content)}]' --id id
  [##----------------------------------]  1788/30866    5%  00:01:51
simonw commented 3 years ago

Given how awkward that is I'm leaning towards coming up with a default option for this now.