All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Cc: Jeff King <peff@peff.net>,
	git@vger.kernel.org, Michael J Gruber <git@drmicha.warpmail.net>
Subject: Re: [PATCH 2/4] add -u: get rid of "treewideupdate" configuration
Date: Sat, 09 Apr 2011 14:34:28 -0700	[thread overview]
Message-ID: <7voc4fyuqj.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <BANLkTinSZeNizg+8wEu_wjc09E_1dius5Q@mail.gmail.com> (Nguyen Thai Ngoc Duy's message of "Sat, 9 Apr 2011 12:05:45 +0700")

Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:

> On Sat, Apr 9, 2011 at 11:56 AM, Junio C Hamano <gitster@pobox.com> wrote:
>
>> ... If you rewrite the verify_filename() in the
>> way I outlined above, you wouldn't have to.
>
> I considered that, but we may need to go through the whole worktree
> just to verify "*.c" matches something.

You are absolutely right.  After all, this is only meant to be a quick
sanity check to ensure that we got the user's intention absolutely right
when the user did not disambiguate with '--'.  When we see all earlier
ones are object names (and cannot be filenames) and all later ones have
working tree entries (and cannot be object names), we are sure that we got
the missing '--' boundary right.

And we error out when there is any doubt, and that is a good feature.
Even when there is no glob involved, e.g. "git log builtin-add.c", we fail
the parsing, because there is no builtin-add.c in the filesystem in
today's checkou.  That behaviour is coming exactly from that reasoning: we
may be sure that "builtin-add.c" cannot be an object name, but we don't
know if it is a typo of builtin/add.c (or builtin-add.o, etc.), and we
don't want to make the user wait while we are guessing.

So let's forget about the suggestion.  Thanks for injecting sanity to the
discussion and stopping me from going overboard.

  reply	other threads:[~2011-04-09 21:34 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-07  1:16 [PATCH 0/4] Redoing the "add -u" migration plan Junio C Hamano
2011-04-07  1:16 ` [PATCH 1/4] magic pathspec: add tentative ":/path/from/top/level" pathspec support Junio C Hamano
2011-04-07  1:40   ` Junio C Hamano
2011-04-07 13:09     ` Nguyen Thai Ngoc Duy
2011-04-07 18:28       ` Junio C Hamano
2011-04-08 11:39         ` Nguyen Thai Ngoc Duy
2011-04-07 13:23   ` Nguyen Thai Ngoc Duy
2011-04-07 16:18     ` Junio C Hamano
2011-04-08 12:00       ` Nguyen Thai Ngoc Duy
2011-04-08 15:05         ` Junio C Hamano
2011-04-08 15:39           ` Nguyen Thai Ngoc Duy
2011-04-08 16:37           ` Junio C Hamano
2011-04-08 17:02             ` Nguyen Thai Ngoc Duy
2011-04-07  1:16 ` [PATCH 2/4] add -u: get rid of "treewideupdate" configuration Junio C Hamano
2011-04-08 17:54   ` Jeff King
2011-04-08 19:27     ` Junio C Hamano
2011-04-08 20:24       ` Jeff King
2011-04-08 22:22         ` Junio C Hamano
2011-04-08 22:32           ` Jeff King
2011-04-08 22:37             ` Junio C Hamano
2011-04-08 23:18               ` Junio C Hamano
2011-04-09  4:38                 ` Nguyen Thai Ngoc Duy
2011-04-09  4:56                   ` Junio C Hamano
2011-04-09  5:05                     ` Nguyen Thai Ngoc Duy
2011-04-09 21:34                       ` Junio C Hamano [this message]
2011-04-09  4:58                 ` Nguyen Thai Ngoc Duy
2011-04-09  5:20                   ` Junio C Hamano
2011-04-09 10:15                     ` Nguyen Thai Ngoc Duy
2011-04-09 11:24                   ` Nguyen Thai Ngoc Duy
2011-04-09 21:38                     ` Junio C Hamano
2011-05-03  7:52                 ` Nguyen Thai Ngoc Duy
2011-05-03 15:01                   ` Junio C Hamano
2011-05-03 16:17                     ` Nguyen Thai Ngoc Duy
2011-04-07  1:16 ` [PATCH 3/4] add: make "add -u/-A" update full tree without pathspec (step 2) Junio C Hamano
2011-04-07  1:16 ` [PATCH 4/4] add: make "add -u/-A" update full tree without pathspec (step 3) 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=7voc4fyuqj.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=pclouds@gmail.com \
    --cc=peff@peff.net \
    /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.