summaryrefslogtreecommitdiff
path: root/upload-pack.c
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-09-05 10:40:38 +0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-09-05 12:25:19 -0700
commitbc341c8b61f7f55920798f809a296f3e4dd84e39 (patch)
tree04d28fff4d57fc80879336c3a285acceba881772 /upload-pack.c
parentrm: do not set a variable twice without intermediate reading. (diff)
downloadtgif-bc341c8b61f7f55920798f809a296f3e4dd84e39.tar.xz
pathspec: catch prepending :(prefix) on pathspec with short magic
:(prefix) is in the long form. Suppose people pass :!foo with '!' being the short form of magic 'bar', the code will happily turn it to :(prefix..)!foo, which makes '!' part of the path and no longer a magic. The correct form must be ':(prefix..,bar)foo', but as so far we haven't had any magic in short form yet (*), the code to convert from short form to long one will be inactive anyway. Let's postpone it until a real short form magic appears. (*) The short form magic '/' is a special case and won't be caught by this die(), which is correct. When '/' magic is detected, prefixlen is set back to 0 and the whole "if (prefixlen..)" block is skipped. 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 'upload-pack.c')
0 files changed, 0 insertions, 0 deletions