Re: [PATCH 2/4] Teach git-add--interactive to accept a file path to patch

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

 



Wincent Colaiuta <win@xxxxxxxxxxx> writes:

> El 22/11/2007, a las 12:29, Junio C Hamano escribió:
>
>> By the way, the arguments on the command line to git commands
>> after "--" are generally pathspecs, iow, patterns to specify
>> groups of files.  Please do not introduce unnecessary
>> inconsistencies to the UI by requiring them to be exact pathname
>> only in this particular mode of the command and nowhere else.
>
> Well, I it wasn't my intention to introduce any such requirement. The
> path parameters get passed in and eventually handed over unmodified to:
>
> 	git diff-files -p --

What I was referring to was this in your original:

>> +	my @tracked = grep {
>> +		defined run_cmd_pipe(qw(git ls-files
>> +			                --exclude-standard --), $_)
>> +	} @ARGV;

It picks elements from @ARGV that ls-files says "Ok" back, not
the expanded result from ls-files, and @tracked elements are
used later as filenames.  Which means you are expecting @ARGV to
contain only concrete filenames, not pathspec.

> Or if we add some kind of "--patch" switch, instead do:
>
> 	git add -i --patch foo

You do not need both "-i" and "--patch", do you?  Plain git-add
does not take --patch anyway so it can pass --patch to the
underlying interactive one.

-
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