Ramkumar Ramachandra <artag...@gmail.com> writes:
> Sorry I wasn't clear. A~B = $(git merge-base A B) B to diff and $(git
> merge-base A B)..B to log.
> Basically, I want to be able to do git log master~rebase.autostash
> (without having to rebase).
How is it different from "git log master..rebase.autostash"?
git log A..B
is already a perfectly fine way to spell your "A~B", which is
git log B --not $(git merge-base --all A B)
when written in longhand [*1*], no?
So I do not think your A~B helps "log".
It does not help "diff" either, because we already have A...B and we
are not going to remove it (people are used to what it means).
So I think your A~B is still a solution that is looking for a
*1* You need to understand what merge-base is in order to analyse
the equivalence of these two. A..B asks for those that are
reachable from B that are not reachable from A. What does the
other form ask, by saying "ones that can be reached from B but
exclude the ones that are reachable from any merge base of A and
On the history leading to A, there are two kinds of commits:
those that are not reachable from B and those that are. The
ones closer to A may not be reachable from B but if you dig the
history starting from A and keep finding ancestors, you will
eventually hit one that can be reached from B. Once you hit
such a commit, everything beyond that point are reachable from
both A and B. E.g.
And we call that a merge base between A and B (e.g. '*'). Any
ancestor of a merge base, e.g. 'o', is reachable from A and is
excluded from "A..B".
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html