Re: [RFC] The design of new pathspec features

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

 



Duy Nguyen <pclouds@xxxxxxxxx> writes:

>>         prefixq=$(git rev-parse --show-prefix-glob-quoted)
>>         pathspec="$prefixq$1"
>>
>> but magic that applies only to a substring may have other uses.
>
> Yeah, that simplifies things. Supporting applying magic over just
> parts of the pathspec pattern sounds complex. Just a small
> modification. That rev-parse needs to look at "$1" as well.

Makes sense.  More like

	prefix=$(git rev-parse --show-prefix)
	test -z "$prefix" || cd $(git rev-parse --show-cdup)
	...
	pathspec=$(git rev-parse --prefix-pathspec "$prefix" "$1")
	git ls-files "$pathspec"

which may take prefix="D*cumentati*n" (from the previous example),
and the user may have given ":(icase)hell*.txt" to "$1".  Ideally
the scriptors shouldn't have to worry about how to add the prefix to
the user supplied pathspec.
--
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]