Re: [PATCH] builtin-add: fix command line building to call interactive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Nov 25, 2007 at 11:48:28AM -0800, Junio C Hamano wrote:

> > 	git-add -i *.h
> >
> > (Note that's "*.h" and not "\*.h"). In the Git repository, without  
> > validation, this just works. With strict validation, it would complain...
> 
> I'd mostly agree, but we need to realize that this is a two edged sword.
> Pathspecs can be leading-directories or fileglobs.  For fileglobs, you
> are right.  The user can let the shell do the globbing.  Not validating,
> however, also means that
> 
> 	git add -p Documentatoin
> 
> would report "there is nothing to patch" without being helpful, pointing
> out that the name of the directory is misspelled.

I think the problem there is not validation, but that the previous
proposal was validating the wrong thing. IOW, the user doesn't want a
complaint "this file is not tracked by git" (which catches untracked
things with *.h) but rather "this file does not even exist" (which
catches typos like Documentatoin).

So it is not really a git pathspec being provided (from the user's point
of view), but rather something else (a pathspec _or_ a working tree
file).

-Peff
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux