summaryrefslogtreecommitdiff
path: root/userdiff.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-07-14 08:36:04 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-07-15 17:56:09 (GMT)
commit233c3e6c59945650e5919893a4f090824f06e889 (patch)
tree12f989ca333c270f622d7e163849972159370ec1 /userdiff.h
parent645a29c40a12a4ade1b041dce246ae241c502a64 (diff)
downloadgit-233c3e6c59945650e5919893a4f090824f06e889.zip
git-233c3e6c59945650e5919893a4f090824f06e889.tar.gz
git-233c3e6c59945650e5919893a4f090824f06e889.tar.bz2
parse_pathspec: preserve prefix length via PATHSPEC_PREFIX_ORIGIN
The prefix length is passed from one command to another via the new magic 'prefix'. The magic is for parse_pathspec's internal use only, not visible to parse_pathspec's callers. Prefix length is not preserved across commands when --literal-pathspecs is specified (no magic is allowed, including 'prefix'). That's OK because we know all paths are literal. No magic, no special treatment regarding prefix. (This may be no longer true if we make :(glob) default) Other options to preserve the prefix include saving it to env variable or quoting. Env var way (at least _one_ env var) is not suitable because the prefix is not the same for all pathspecs. Pathspecs starting with "../" will eat into the prefix part. We could also preserve 'prefix' across commands by quoting the prefix part, then dequoting on receiving. But it may not be 100% accurate, we may dequote longer than the original prefix part, for example. That may be good or not, but it's not the purpose. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'userdiff.h')
0 files changed, 0 insertions, 0 deletions