I just recently noticed that when you do
git cherry-pick foo..bar
foo is not included. If your history looks like this:
bar
blubb
foo
the previous commit will only pick blubb and bar.
That’s the same with
git log foo..bar
One can easily fix that by using
git log foo~..bar
I just couldn’t find that documented and wanted to know if all commands that accept range operators in git work this way or if it depends on the specific command.
I guess the former but who knows…
Yes, all Git commands that accept a revision will work with
~that, in this form, specifies immediate parent of the revision. You can find a more detailed descriptions of Git revisions format here.