git-ratchet
git-ratchet copied to clipboard
Add a command to show the commit id that set a baseline
For example, something like git-ratchet baseline -p pageweightv1
would show the most recent commit id where the metric was equal to the baseline for each known metric in the most recent ratchet note.
The use case for this is to effectively find the "last known good" commit. I guess normally that commit shouldn't be that far away, but we've neglected our page weight build for a long time and now want to easily identify where the baseline was set. I've done it manually for a few metrics, but it might be useful for others.
How have you gone about doing it manually?
This shouldn't be too difficult to add, though it may be a better overall addition to add commit hash to the output of the git ratchet dump
command to make it easier to find the hash via parsing that.
Very manually - I ran the same command as git-ratchet does and piped it into Sublime:
git --no-pager log --notes=git-ratchet-excuse-1-pageweightv1 --pretty=format:'%H,%ae,%at,"%N",' HEAD|subl
Then for the baseline of the metric I wanted I searched for "number,number" which finds the commits where the value was equal to the baseline. My assumption is that it must've started going up after first (most recent) match.
Outputting the commit hash in the dump would probably be enough to save having to do the command manually.
This would be super useful