summaryrefslogtreecommitdiff
path: root/builtin/cat-file.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-12-06 07:30:49 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-12-06 21:00:40 (GMT)
commit1649612a227eaa5af7cb0e2d059728c0148485d9 (patch)
tree7ead7b584f722f434ddcc2af5f02d79bf7a0541e /builtin/cat-file.c
parentef79b1f8704668a6cdf4278f9255e03ca785bfb4 (diff)
downloadgit-1649612a227eaa5af7cb0e2d059728c0148485d9.zip
git-1649612a227eaa5af7cb0e2d059728c0148485d9.tar.gz
git-1649612a227eaa5af7cb0e2d059728c0148485d9.tar.bz2
pathspec.c: support adding prefix magic to a pathspec with mnemonic magic
Back in 233c3e6 (parse_pathspec: preserve prefix length via PATHSPEC_PREFIX_ORIGIN - 2013-07-14), parse_pathspec() is taught to save prefix length as a dynamic magic. This is needed when the pathspec is passed to another process and and prefix lenght would be lost. Back then we support two cases. If the pathspec is normal, e.g. "abc", we simply add the prefix to become ":(prefix:2)abc". If the pathspec contains long magic, e.g. ":(foo,bar)abc" then we turn it to ":(foo,bar,prefix:2)abc". We do not support prefixing on short form, because the only supported mnemonic '/' disappears after the the preprocessing steps. With the introduction of exclude magic with mnemonic '!', we need to add support for the short form case so that ':!abc' becomes ':(exclude,prefix:2)abc'. Without this, it will break cd Documentation git add -p -- . ':!technical' 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/cat-file.c')
0 files changed, 0 insertions, 0 deletions