git-history
git-history copied to clipboard
Confirm if this works with repos with branches in the history
I couldn't get this to work, and I have a hunch it may be because that repository uses branches and doesn't have a linear history:
git-history file iam.db \
policy_sentry/shared/data/iam-definition.json \
--id service --id privilege \
--convert '
data = json.loads(content)
for service, stuff in data.items():
for _, privilege in stuff["privileges"].items():
privilege["service"] = service
yield privilege
' --branch master
Against https://github.com/salesforce/policy_sentry
Originally posted by @simonw in https://github.com/simonw/iam-definitions-datasette/issues/1#issuecomment-989271347
Visualization of the branches over time: https://github.com/salesforce/policy_sentry/network
I'm suspicious that this code isn't iterating across every commit: https://github.com/simonw/git-history/blob/1a2b0b82d73edbe4ffdbf00be1c984ee28cca589/git_history/cli.py#L15-L16
I added some debug logging and I couldn't see it visit any commits which included versions of the policy_sentry/shared/data/iam-definition.json
file.