summaryrefslogtreecommitdiff
path: root/builtin/rm.c
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2014-12-28 06:39:47 +0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-12-29 12:40:45 -0800
commitfad32bcd83ec4e4f88013e4a0b05f42e32e2c6f5 (patch)
tree411b04fd3ba7cf8913eeac1ae77574827fcb0e5f /builtin/rm.c
parentattr.c: rename arg name attr_nr to avoid shadowing the global one (diff)
downloadtgif-fad32bcd83ec4e4f88013e4a0b05f42e32e2c6f5.tar.xz
attr: do not attempt to expand when we know it's not a macro
Keep track of all recognized macros in the new "maybe_macro" field. If this field is true, it _may_ be a macro (depending on what's in the current attr stack). But if the field is false, it's definitely not a macro, no need to go through the whole attr stack in macroexpand_one() to search for one. Without this, "git grep abcdefghi" on git.git hits the inner loop in macroexpand_one() 2481 times. With this, it's 66 times. Helped-by: Eric Sunshine <sunshine@sunshineco.com> 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 'builtin/rm.c')
0 files changed, 0 insertions, 0 deletions