Skip to content

Commit

Permalink
git svn: find-rev allows short switches for near matches
Browse files Browse the repository at this point in the history
Allow -B and -A to act as short aliases for --before and --after
options respectively.  This reduces typing and hopefully allows
reuse of muscle memory for grep(1) users.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
  • Loading branch information
Eric Wong committed Sep 14, 2014
1 parent 26bb3c1 commit a831a3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Documentation/git-svn.txt
Original file line number Diff line number Diff line change
Expand Up @@ -386,11 +386,13 @@ Any other arguments are passed directly to 'git log'
tree-ish to specify which branch should be searched). When given a
tree-ish, returns the corresponding SVN revision number.
+
-B;;
--before;;
Don't require an exact match if given an SVN revision, instead find
the commit corresponding to the state of the SVN repository (on the
current branch) at the specified revision.
+
-A;;
--after;;
Don't require an exact match if given an SVN revision; if there is
not an exact match return the closest match searching forward in the
Expand Down
4 changes: 2 additions & 2 deletions git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,8 @@ sub _req_svn {
} ],
'find-rev' => [ \&cmd_find_rev,
"Translate between SVN revision numbers and tree-ish",
{ 'before' => \$_before,
'after' => \$_after } ],
{ 'B|before' => \$_before,
'A|after' => \$_after } ],
'rebase' => [ \&cmd_rebase, "Fetch and rebase your working directory",
{ 'merge|m|M' => \$_merge,
'verbose|v' => \$_verbose,
Expand Down

0 comments on commit a831a3f

Please sign in to comment.