Skip to content

Commit

Permalink
Synonyms: -i == --regexp-ignore-case, -E == --extended-regexp
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Jul 22, 2007
1 parent 98ec4ad commit e5633cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions Documentation/git-rev-list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ SYNOPSIS
[ \--cherry-pick ]
[ \--encoding[=<encoding>] ]
[ \--(author|committer|grep)=<pattern> ]
[ \--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 ]
Expand Down Expand Up @@ -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.
Expand Down
6 changes: 4 additions & 2 deletions revision.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e5633cb

Please sign in to comment.