Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

git provides a couple of options for running a script against the code for every commit


Even without built in options, writing a for-loop over the result of git log or rev-list is more or less two lines of scripting. Same with a walk over rev-parse HEAD^.

Then you also have git bisect but that's more for finding when some metric started to show anomalies.


Would that be git for-each-ref [1] or something different?

[1]: https://git-scm.com/docs/git-for-each-ref


Commits are not refs, only the head of a branch (or tag) is a ref.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: