unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Juri Linkov <juri@linkov.net>
Cc: emacs-devel <emacs-devel@gnu.org>,
	Stefan Monnier <monnier@IRO.UMontreal.CA>,
	Dmitry Gutov <dgutov@yandex.ru>
Subject: Re: Merge-base alias for git vc-diff
Date: Thu, 03 Jan 2019 21:44:05 +0000	[thread overview]
Message-ID: <871s5t1knu.fsf@gmail.com> (raw)
In-Reply-To: <877efl8pgj.fsf@mail.linkov.net> (Juri Linkov's message of "Thu,  03 Jan 2019 22:38:36 +0200")

Juri Linkov <juri@linkov.net> writes:

>> 2. A diff is always a comparison of two revisions, right?  For vc-dir,
>>    isn't a UI like query-replace's suitable here?  You know, that thing
>>    where you type the pattern and the replacement interactively in the
>>    same minibuffer prompt, separated by the arrow.  You can M-p, C-r,
>>    etc, flawlessly. I really like that UI, it's really intuitive (kudos
>>    to whoever participated, btw).
>>
>>    So here, instead of pattern and replacement, two revisions.  All one
>>    would need, apparently, is to turn the arrow into a ".." and make it
>>    toggleable to "..." with say, C-M-y.  I think it would simplify the
>>    completion problem: on both sides of the ".." or "..." you just
>>    complete a revision using whatever system we presumably already have
>>    in place for that.
>
> Good idea.

Cool. I'd say go for it! (unless someone seriously objects).

For a first stab at this, most of the UI work would be in
vc-diff-build-argument-list-internal which would, if passed an optional
argument, say CHOOSE-REVISION-RELATIONSHIP, use the new UI and return an
extra element at the end saying the merge-base should be used.  It
should be a question of grabbing this element in vc-version-diff and
passing it this down to vc-<backend>-diff.

The Git backend would know how to handle it (as could presumably other
backends).  The value of CHOOSE-REVISION-RELATIONSHIP passed in
vc-version-diff could be a backend-specific decision.

> The only problem is that then we have to use different amount of dots
> for vc-root-diff and vc-print-root-log because in git: ‘git diff
> A...B’ corresponds to ‘git log A..B’ whereas ‘git diff A..B’
> corresponds to ‘git log A...B’

Really? Ugh, that unfortunate.  Well we could just live with it or use
different symbols to abstract it away.

João



  reply	other threads:[~2019-01-03 21:44 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
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 [this message]
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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871s5t1knu.fsf@gmail.com \
    --to=joaotavora@gmail.com \
    --cc=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=juri@linkov.net \
    --cc=monnier@IRO.UMontreal.CA \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).