grep: prepare for new header field filter
commitad4813b3c2513c5dc7e84305ab8a393b32124977
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sat, 29 Sep 2012 04:41:27 +0000 (29 11:41 +0700)
committerJunio C Hamano <gitster@pobox.com>
Sat, 29 Sep 2012 18:40:58 +0000 (29 11:40 -0700)
tree336f7cc4fdf78e070f8342eeee8a3f11b343012a
parent652398a88e7c3d18b6820a2ae369b05d26dc757f
grep: prepare for new header field filter

grep supports only author and committer headers, which have the same
special treatment that later headers may or may not have. Check for
field type and only strip_timestamp() when the field is either author
or committer.

GREP_HEADER_FIELD_MAX is put in the grep_header_field enum to be
calculated automatically, correctly, as long as it's at the end of the
enum.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
grep.c
grep.h
t/t7810-grep.sh