commit | 4b87474bc9b620cf07b09130e33963cdaf34c603 | [log] [tgz] |
---|---|---|
author | Junio C Hamano <gitster@pobox.com> | Sat Nov 17 21:18:14 2007 -0800 |
committer | Junio C Hamano <gitster@pobox.com> | Sat Nov 17 21:19:55 2007 -0800 |
tree | f41893e4907c7f19955181d7860eea6155e92b2d | |
parent | 78e694787cb89cd008e237b17cdc7f0fa5a15d22 [diff] |
grep -An -Bm: fix invocation of external grep command When building command line to invoke external grep, the arguments to -A/-B/-C options were placd in randarg[] buffer, but the code forgot that snprintf() does not count terminating NUL in its return value. This caused "git grep -A1 -B2" to invoke external grep with "-B21 -A1". Signed-off-by: Junio C Hamano <gitster@pobox.com>