summaryrefslogtreecommitdiff
path: root/test-match-trees.c
diff options
context:
space:
mode:
authorDuy Nguyen <pclouds@gmail.com>2013-01-16 13:02:38 +0700
committerJunio C Hamano <gitster@pobox.com>2013-01-16 11:08:55 -0800
commit9db9eecfe5c2490d17c0d4bd5452e4cb1d0948c5 (patch)
treef6dd00f2d7a013f2ae3474a635611b12388f8678 /test-match-trees.c
parent711536bd4ba791adfd506583927a8f6c8f821e24 (diff)
downloadgit-9db9eecfe5c2490d17c0d4bd5452e4cb1d0948c5.tar.gz
attr: avoid calling find_basename() twice per path
find_basename() is only used inside collect_all_attrs(), called once in prepare_attr_stack, then again after prepare_attr_stack() returns. Both calls return exact same value. Reorder the code to do the same task once. Also avoid strlen() because we knows the length after finding basename. 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 'test-match-trees.c')
0 files changed, 0 insertions, 0 deletions