@matheusbsbs / matheus-bagliano / commits / e5633cbb85
Fork 0

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>

Junio C Hamano committed Jul 21, 2007 at 23:18 UTC e5633cbb8577b430f175f62cf4e7ed53f2434a89
2 files changed +8 -5
Documentation/git-rev-list.txt
+4 -3
@@ -27,7 +27,8 @@ SYNOPSIS
27 [ \--cherry-pick ]
28 [ \--encoding[=<encoding>] ]
29 [ \--(author|committer|grep)=<pattern> ]
30 - [ \--regexp-ignore-case ] [ \--extended-regexp ]
30 + [ \--regexp-ignore-case | \-i ]
31 + [ \--extended-regexp | \-E ]
32 [ \--date={local|relative|default|iso|rfc|short} ]
33 [ [\--objects | \--objects-edge] [ \--unpacked ] ]
34 [ \--pretty | \--header ]
@@ -227,11 +228,11 @@ limiting may be applied.
228 Limit the commits output to ones with log message that
229 matches the specified pattern (regular expression).
230
230 ---regexp-ignore-case::
231 +-i, --regexp-ignore-case::
232
233 Match the regexp limiting patterns without regard to letters case.
234
234 ---extended-regexp::
235 +-E, --extended-regexp::
236
237 Consider the limiting patterns to be extended regular expressions
238 instead of the default basic regular expressions.
revision.c
+4 -2
@@ -1165,11 +1165,13 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
1165 add_message_grep(revs, arg+7);
1166 continue;
1167 }
1168 - if (!prefixcmp(arg, "--extended-regexp")) {
1168 + if (!strcmp(arg, "--extended-regexp") ||
1169 + !strcmp(arg, "-E")) {
1170 regflags |= REG_EXTENDED;
1171 continue;
1172 }
1172 - if (!prefixcmp(arg, "--regexp-ignore-case")) {
1173 + if (!strcmp(arg, "--regexp-ignore-case") ||
1174 + !strcmp(arg, "-i")) {
1175 regflags |= REG_ICASE;
1176 continue;
1177 }