summaryrefslogtreecommitdiff
path: root/pack-check.c
diff options
context:
space:
mode:
authorLibravatar Jakub Narebski <jnareb@gmail.com>2012-01-05 21:32:56 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-01-05 13:29:51 -0800
commit8e09fd1a1e5ea8eaec960d47be51bde85df8870e (patch)
tree126a0cdb8c40bc78fd2c36f26bf4808e9154bb81 /pack-check.c
parentgitweb: Fix file links in "grep" search (diff)
downloadtgif-8e09fd1a1e5ea8eaec960d47be51bde85df8870e.tar.xz
gitweb: Harden "grep" search against filenames with ':'
Run "git grep" in "grep" search with '-z' option, to be able to parse response also for files with filename containing ':' character. The ':' character is otherwise (without '-z') used to separate filename from line number and from matched line. Note that this does not protect files with filename containing embedded newline. This would be hard but doable for text files, and harder or even currently impossible with binary files: git does not quote filename in "Binary file <foo> matches" message, but new `--break` and/or `--header` options to git-grep could help here. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-check.c')
0 files changed, 0 insertions, 0 deletions