Skip to content

Commit e5633cb

Browse files
committed
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>
1 parent 98ec4ad commit e5633cb

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

Documentation/git-rev-list.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ SYNOPSIS
2727
[ \--cherry-pick ]
2828
[ \--encoding[=<encoding>] ]
2929
[ \--(author|committer|grep)=<pattern> ]
30-
[ \--regexp-ignore-case ] [ \--extended-regexp ]
30+
[ \--regexp-ignore-case | \-i ]
31+
[ \--extended-regexp | \-E ]
3132
[ \--date={local|relative|default|iso|rfc|short} ]
3233
[ [\--objects | \--objects-edge] [ \--unpacked ] ]
3334
[ \--pretty | \--header ]
@@ -227,11 +228,11 @@ limiting may be applied.
227228
Limit the commits output to ones with log message that
228229
matches the specified pattern (regular expression).
229230

230-
--regexp-ignore-case::
231+
-i, --regexp-ignore-case::
231232

232233
Match the regexp limiting patterns without regard to letters case.
233234

234-
--extended-regexp::
235+
-E, --extended-regexp::
235236

236237
Consider the limiting patterns to be extended regular expressions
237238
instead of the default basic regular expressions.

revision.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,11 +1165,13 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
11651165
add_message_grep(revs, arg+7);
11661166
continue;
11671167
}
1168-
if (!prefixcmp(arg, "--extended-regexp")) {
1168+
if (!strcmp(arg, "--extended-regexp") ||
1169+
!strcmp(arg, "-E")) {
11691170
regflags |= REG_EXTENDED;
11701171
continue;
11711172
}
1172-
if (!prefixcmp(arg, "--regexp-ignore-case")) {
1173+
if (!strcmp(arg, "--regexp-ignore-case") ||
1174+
!strcmp(arg, "-i")) {
11731175
regflags |= REG_ICASE;
11741176
continue;
11751177
}

0 commit comments

Comments
 (0)