Synonyms: -i == --regexp-ignore-case, -E == --extended-regexp

These options to log family were too long to type.  Give them
shorter synonyms.

Fix the parsing of the long options while at it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Junio C Hamano
2007-07-21 23:18:33 -07:00
parent 98ec4ad7f9
commit e5633cbb85
2 changed files with 8 additions and 5 deletions

View File

@ -1165,11 +1165,13 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
add_message_grep(revs, arg+7);
continue;
}
if (!prefixcmp(arg, "--extended-regexp")) {
if (!strcmp(arg, "--extended-regexp") ||
!strcmp(arg, "-E")) {
regflags |= REG_EXTENDED;
continue;
}
if (!prefixcmp(arg, "--regexp-ignore-case")) {
if (!strcmp(arg, "--regexp-ignore-case") ||
!strcmp(arg, "-i")) {
regflags |= REG_ICASE;
continue;
}