aboutsummaryrefslogtreecommitdiff
path: root/imap-send.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2014-12-28 06:39:47 +0700
committerJunio C Hamano <gitster@pobox.com>2014-12-29 12:40:45 -0800
commitfad32bcd83ec4e4f88013e4a0b05f42e32e2c6f5 (patch)
tree411b04fd3ba7cf8913eeac1ae77574827fcb0e5f /imap-send.c
parentaa7710e064a9ee644e1e86bd6f89193200ac4ccd (diff)
downloadgit-fad32bcd83ec4e4f88013e4a0b05f42e32e2c6f5.tar.gz
git-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 'imap-send.c')
0 files changed, 0 insertions, 0 deletions