Suppose S is the SHA of a git commit.
How can we express the range S^..S without the annoyance of repeating S?
In other words, "give me the one-commit range ending in commit S".
(And is there way which generalizes to N commits ending in S?)
I read man gitrevisions backwards and forwards; didn't find anything.
I think you are searching for <tree-ish>^!
See gitrevisions documentation for details:
Repeated for convenience:
<rev>^!, e.g. HEAD^!A suffix
^followed by an exclamation mark is the same as giving commit<rev>and then all its parents prefixed with^to exclude them (and their ancestors).
Not as easy to understand, but I am quite certain it is what you are searching for.
But I don't see a generalized way to do this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With