[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Merge-base alias for git vc-diff

From: Juri Linkov
Subject: Merge-base alias for git vc-diff
Date: Thu, 27 Dec 2018 00:32:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

I can't find how vc could compare the HEAD of the branch with its merge base.

The documentation recommends using `git diff topic...master' to find
changes that occurred on the master branch since when the topic branch
was started off it.

But it seems that vc-diff uses neither `..' nor `...'

Even `vc-git-log-incoming' and `vc-git-log-outgoing' use only `..'

Since "git diff A...B" is equivalent to "git diff $(git-merge-base A B) B",
doing the same means adding a new alias "MERGE-BASE" to the completions of
`C-u C-x v D' (vc-root-diff) to complement the existing alias "HEAD".

Does this make sense or there is a simpler way to do the same?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]