All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Kevin Daudt <me@ikke.info>,
	"Robert P. J. Day" <rpjday@crashcourse.ca>,
	Git Mailing list <git@vger.kernel.org>
Subject: Re: [PATCH v2] gitcli: tweak "man gitcli" for clarity
Date: Fri, 24 Nov 2017 13:16:39 -0500	[thread overview]
Message-ID: <20171124181639.GD29190@sigill> (raw)
In-Reply-To: <xmqq7eugqykq.fsf@gitster.mtv.corp.google.com>

On Fri, Nov 24, 2017 at 10:01:41AM +0900, Junio C Hamano wrote:

> Actually the second example is a lot worse (and that is why I am
> bringing it up).  If git does spend cycles to realize that "git
> could", for consistency, it must also check if "next" is unambiguous
> between a path or a rev, i.e. it must dig history from "master" and
> see if "next" appears as a path ever in the history, and if so, die
> with "ambiguous argument".

I just sent a similar response before reading this, and agree with
everything you said.

But I wanted to point out this "we must also look for ambiguities"
argument, because I totally missed it in my response. And it's much more
damning, I think, because it means you can never short-cut the easy
cases and say "OK, we found the path, therefore we can stop our
traversal early". To behave consistently, you have to always do the
whole traversal twice.

-Peff

  reply	other threads:[~2017-11-24 18:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-21 21:27 [PATCH v2] gitcli: tweak "man gitcli" for clarity Robert P. J. Day
2017-11-21 21:45 ` Kevin Daudt
2017-11-21 21:47   ` Robert P. J. Day
2017-11-21 22:04     ` Kevin Daudt
2017-11-21 22:12       ` Robert P. J. Day
2017-11-22  9:55   ` Robert P. J. Day
2017-11-22 10:34     ` Junio C Hamano
2017-11-22 11:19       ` Robert P. J. Day
2017-11-22 11:41         ` Kevin Daudt
2017-11-22 11:46           ` Robert P. J. Day
2017-11-23  0:03   ` Jeff King
2017-11-23  2:22     ` Junio C Hamano
2017-11-23  7:45     ` Robert P. J. Day
2017-11-23 13:51       ` Jeff King
2017-11-23 20:55         ` Kevin Daudt
2017-11-24  1:01           ` Junio C Hamano
2017-11-24 18:16             ` Jeff King [this message]
2017-11-24 18:12           ` Jeff King
2017-11-25  3:02             ` 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=20171124181639.GD29190@sigill \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=me@ikke.info \
    --cc=rpjday@crashcourse.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.
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.