diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2014-12-28 06:39:47 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-12-29 12:40:45 -0800 |
commit | fad32bcd83ec4e4f88013e4a0b05f42e32e2c6f5 (patch) | |
tree | 411b04fd3ba7cf8913eeac1ae77574827fcb0e5f /Documentation/git-p4.txt | |
parent | attr.c: rename arg name attr_nr to avoid shadowing the global one (diff) | |
download | tgif-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 'Documentation/git-p4.txt')
0 files changed, 0 insertions, 0 deletions