Skip to content

Commit a831a3f

Browse files
author
Eric Wong
committed
git svn: find-rev allows short switches for near matches
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>
1 parent 26bb3c1 commit a831a3f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Documentation/git-svn.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,11 +386,13 @@ Any other arguments are passed directly to 'git log'
386386
tree-ish to specify which branch should be searched). When given a
387387
tree-ish, returns the corresponding SVN revision number.
388388
+
389+
-B;;
389390
--before;;
390391
Don't require an exact match if given an SVN revision, instead find
391392
the commit corresponding to the state of the SVN repository (on the
392393
current branch) at the specified revision.
393394
+
395+
-A;;
394396
--after;;
395397
Don't require an exact match if given an SVN revision; if there is
396398
not an exact match return the closest match searching forward in the

git-svn.perl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,8 @@ sub _req_svn {
260260
} ],
261261
'find-rev' => [ \&cmd_find_rev,
262262
"Translate between SVN revision numbers and tree-ish",
263-
{ 'before' => \$_before,
264-
'after' => \$_after } ],
263+
{ 'B|before' => \$_before,
264+
'A|after' => \$_after } ],
265265
'rebase' => [ \&cmd_rebase, "Fetch and rebase your working directory",
266266
{ 'merge|m|M' => \$_merge,
267267
'verbose|v' => \$_verbose,

0 commit comments

Comments
 (0)