From: Juri Linkov <juri@linkov.net>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: emacs-devel@gnu.org
Subject: Re: Merge-base alias for git vc-diff
Date: Thu, 27 Dec 2018 22:02:35 +0200 [thread overview]
Message-ID: <87lg4aak10.fsf@mail.linkov.net> (raw)
In-Reply-To: <92f058a4-ef98-725b-9603-5a671113dfaa@yandex.ru> (Dmitry Gutov's message of "Thu, 27 Dec 2018 03:07:01 +0200")
>> 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.
MERGE-BASE could be a VC alias, not Git alias. So it could be handled
specially by ‘vc-git-diff’, ‘vc-git-revision-table’, etc.
> Maybe you'll want to both extend the 'diff' backend command and add a new
> boolean argument to the end.
This is the easiest part of the task.
> 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).
Adding a new command like ‘vc-merge-base-diff’ is easy, but first
I'd like to try to extend the existing command because it is bound
to a short key sequence: ‘C-u C-x v D’ then type ‘TAB’ for completion
and select e.g. ‘MERGE-BASE’.
> (*) Also: merge-base with what? master is not always the base.
This is another problem, then we need to add the prefix MERGE-BASE
to all branches listed in the completions: MERGE-BASE:master,
MERGE-BASE:branch-a, MERGE-BASE:branch-b, ... Too bad.
next prev parent reply other threads:[~2018-12-27 20:02 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-26 22:32 Merge-base alias for git vc-diff Juri Linkov
2018-12-27 1:07 ` Dmitry Gutov
2018-12-27 20:02 ` Juri Linkov [this message]
2018-12-27 20:42 ` Dmitry Gutov
2018-12-28 17:53 ` Stefan Monnier
2018-12-29 21:39 ` Juri Linkov
2019-01-02 0:14 ` Juri Linkov
2019-01-02 1:55 ` Stefan Monnier
2019-01-02 15:34 ` João Távora
2019-01-02 22:25 ` Dmitry Gutov
2019-01-02 22:48 ` João Távora
2019-01-02 23:07 ` Dmitry Gutov
2019-01-03 3:22 ` Stefan Monnier
2019-01-03 13:30 ` João Távora
2019-01-03 20:38 ` Juri Linkov
2019-01-03 21:44 ` João Távora
2019-01-05 22:28 ` Juri Linkov
2019-01-07 22:33 ` Juri Linkov
2019-01-08 14:58 ` Stefan Monnier
2019-01-09 0:05 ` Juri Linkov
2019-01-02 21:29 ` Juri Linkov
2019-01-03 3:40 ` Stefan Monnier
2019-01-10 21:25 ` Juri Linkov
2019-01-10 22:14 ` Dmitry Gutov
2019-01-10 23:25 ` Juri Linkov
2019-01-10 22:41 ` Stefan Monnier
2019-01-10 23:18 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lg4aak10.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=dgutov@yandex.ru \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.