summaryrefslogtreecommitdiff
path: root/t/t7604-merge-custom-message.sh
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2014-06-18 15:51:17 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-06-20 10:45:19 -0700
commit0539cc0038ff3411da1fea342b7d6615643bff5b (patch)
treed8be8b442d56b28de63051611c99821f2a58eab2 /t/t7604-merge-custom-message.sh
parentdaemon: use skip_prefix to avoid magic numbers (diff)
downloadtgif-0539cc0038ff3411da1fea342b7d6615643bff5b.tar.xz
stat_opt: check extra strlen call
As in earlier commits, the diff option parser uses starts_with to find that an argument starts with "--stat-", and then adds strlen("stat-") to find the rest of the option. However, in this case the starts_with and the strlen are separated across functions, making it easy to call the latter without the former. Let's use skip_prefix instead of raw pointer arithmetic to catch such a case. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7604-merge-custom-message.sh')
0 files changed, 0 insertions, 0 deletions