[Top][All Lists]

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

Re: Merge-base alias for git vc-diff

From: Dmitry Gutov
Subject: Re: Merge-base alias for git vc-diff
Date: Thu, 27 Dec 2018 03:07:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:64.0) Gecko/20100101 Thunderbird/64.0

On 27.12.2018 0:32, Juri Linkov wrote:

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".

Do we have aliases like that in VC? HEAD is simply a ref that Git recognizes, but MERGE-BASE is not (*). Not sure how to handle it best.

Maybe you'll want to both extend the 'diff' backend command and add a new boolean argument to the end.

And also add a new command that would use it, similar to vc-root-version-diff (or a new meaning to some value of the prefix argument).

(*) Also: merge-base with what? master is not always the base.

reply via email to

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