From e5633cbb8577b430f175f62cf4e7ed53f2434a89 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 21 Jul 2007 23:18:33 -0700 Subject: [PATCH] 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 --- Documentation/git-rev-list.txt | 7 ++++--- revision.c | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Documentation/git-rev-list.txt b/Documentation/git-rev-list.txt index 08e7573b9..043013909 100644 --- a/Documentation/git-rev-list.txt +++ b/Documentation/git-rev-list.txt @@ -27,7 +27,8 @@ SYNOPSIS [ \--cherry-pick ] [ \--encoding[=] ] [ \--(author|committer|grep)= ] - [ \--regexp-ignore-case ] [ \--extended-regexp ] + [ \--regexp-ignore-case | \-i ] + [ \--extended-regexp | \-E ] [ \--date={local|relative|default|iso|rfc|short} ] [ [\--objects | \--objects-edge] [ \--unpacked ] ] [ \--pretty | \--header ] @@ -227,11 +228,11 @@ limiting may be applied. Limit the commits output to ones with log message that matches the specified pattern (regular expression). ---regexp-ignore-case:: +-i, --regexp-ignore-case:: Match the regexp limiting patterns without regard to letters case. ---extended-regexp:: +-E, --extended-regexp:: Consider the limiting patterns to be extended regular expressions instead of the default basic regular expressions. diff --git a/revision.c b/revision.c index 7036cf224..00b75bc10 100644 --- a/revision.c +++ b/revision.c @@ -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; } -- 2.30.2