git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Aguilar <davvid@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Michael J Gruber <git@drmicha.warpmail.net>, git@vger.kernel.org
Subject: Re: [PATCH] difftool: add support for an extended revision syntax
Date: Mon, 23 Mar 2009 16:33:16 -0700	[thread overview]
Message-ID: <402731c90903231633x32611e07je2df36a4b994f338@mail.gmail.com> (raw)
In-Reply-To: <7vhc1j6czf.fsf@gitster.siamese.dyndns.org>

On Mon, Mar 23, 2009 at 4:22 PM, Junio C Hamano <gitster@pobox.com> wrote:
> David Aguilar <davvid@gmail.com> writes:
>
>> Keep in mind that the syntax that this patch added does not have file~3
>> = HEAD~3.  file~3 means finding file as it existed 3 changes-to-file
>> ago, which is != to HEAD~3 if file did not change in the last 3 commits.
>
> If your motive is to introduce inconsistency to the UI by adding this kind
> of new notation _only to difftool_, I have to reconsider moving it out of
> contrib/ area.


I totally agree that this patch was half-baked, not fully defined,
and should be dropped.  I hope that doesn't influence
your decision for the rest of the patches that came before it.

The notion of "3 commits ago" is ambiguous in a merge-heavy work flow
and using ~ would only confuse things, so I'll see if we can find a better
way to do it, but it shouldn't happen in difftool (if it happens at all).


>
> While I do not fundamentally oppose to add convenient notations for useful
> concepts, you need to start at making sure if this "three changes ago" is
> a well defined concept to begin with.
>
> And it is not a well defined concept in a merge-heavy environment, unless
> you define what you mean by "three changes ago".
>
> If you consider this history:
>
>  ---Y---o---X---M---o mainline = HEAD
>               /
>   ---A---B---C topic
>
> where A, B, C and X, Y are the only commits that touched the file you are
> interested in, how do you define 3-changes-ago?
>
> Maybe X was just a totally uninteresting typofix to a comment, while A, B
> and C were adding a very interesting new feature.  Don't forget that M
> also changes the file from either of its parents (X or C).  Does M count
> as the last change?  Or does it not count because it is just a mechanical
> unconflicting merge?  Which one of X or C is the penultimate change?  The
> one with an earlier committer timestamp?  Tiebreaking with timestamps is
> known to be flawed in the presense of clock skew.
>
> For the consistency of the UI, "starting at HEAD, following first-parent
> ancestry, find N-th commit that touches the path, ignoring all the side
> branches" MUST be the semantics of a notation that uses tilde followed by
> number (so file~3 must mean Y in the above picture), because HEAD~3 is
> defined as "three parents ago, only following the first parent ancestry".
> Anything else will invite user confusion.
>
> But I do not think it is necessarily useful to follow only the first
> parent ancestry to find "three-changes ago" (if such a concept exists).
> If you want a notation that means something else, such as X (because
> chronologically the commits that touched the file are M, C and X in the
> ideal world that everybody has well synchronized clock), you shouldn't use
> tilde-number notation but use something else.
>

Understood and thanks for the help,

-- 
    David

  reply	other threads:[~2009-03-23 23:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-23 10:15 [PATCH] difftool: add support for an extended revision syntax David Aguilar
2009-03-23 14:51 ` Michael J Gruber
2009-03-23 16:33   ` David Aguilar
2009-03-23 16:46     ` Michael J Gruber
2009-03-23 23:22     ` Junio C Hamano
2009-03-23 23:33       ` David Aguilar [this message]
2009-03-23 23:50 ` Junio C Hamano
2009-03-27 15:59 ` Jakub Narebski
2009-03-27 16:28   ` David Aguilar
2009-03-27 17:21     ` Junio C Hamano
2009-03-27 18:16       ` David Aguilar
2009-03-27 17:36     ` Junio C Hamano

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=402731c90903231633x32611e07je2df36a4b994f338@mail.gmail.com \
    --to=davvid@gmail.com \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.
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 NNTP newsgroup(s).