emacs-devel
[Top][All Lists]
Advanced

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

Re: Merge-base alias for git vc-diff


From: Juri Linkov
Subject: Re: Merge-base alias for git vc-diff
Date: Fri, 11 Jan 2019 01:25:31 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>> This means that this feature should be used only this way:
>>
>>    C-u C-x v D master...branch RET branch RET
>
> We could use a more special syntax for this, in order for the user not to
> be confused regarding master...branch..branch.
>
> For example:
>
> C-u C-x v D master^branch RET branch RET
>
> Hopefully not many branches have a ^ in their names.

This is too ad-hoc syntax that might conflict with some VCS special syntax
like HEAD^2.

Let me remind that "git diff A...B" is equivalent to
"git diff $(git-merge-base A B) B".

So we have at least 3 possible solutions:

  C-u C-x v D master...branch RET branch RET  -- where master...branch
                                              -- internally is substituted
                                              -- by the merge-base revision
                                              -- found by "git-merge-base 
master branch"

  C-u C-x v D master...branch RET RET   -- shortcut of the above, but the 
problem is
                                        -- how to get "branch" from rev1
                                        -- when rev2 is empty

  C-x v M D master RET branch RET  -- special command for merge-base revisions



reply via email to

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