summaryrefslogtreecommitdiff
path: root/builtin/pack-redundant.c
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-07-14 15:36:04 +0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-07-15 10:56:09 -0700
commit233c3e6c59945650e5919893a4f090824f06e889 (patch)
tree12f989ca333c270f622d7e163849972159370ec1 /builtin/pack-redundant.c
parentparse_pathspec: make sure the prefix part is wildcard-free (diff)
downloadtgif-233c3e6c59945650e5919893a4f090824f06e889.tar.xz
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 'builtin/pack-redundant.c')
0 files changed, 0 insertions, 0 deletions