git svn: find-rev allows short switches for near matches
authorEric Wong <normalperson@yhbt.net>
Sun, 7 Sep 2014 08:35:19 +0000 (08:35 +0000)
committerEric Wong <normalperson@yhbt.net>
Sun, 14 Sep 2014 08:08:24 +0000 (08:08 +0000)
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>
Documentation/git-svn.txt
git-svn.perl
index 14036cfe691c379d71b4a2756c566210503878d0..ef8ef1c545bbc14366ec71d904ad77b2a74802ff 100644 (file)
@@ -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
index 40565cd6eb6d13888211bd5a3339376660d3abfd..97ff562843c7407533b605aba907e07b4543cb4e 100755 (executable)
@@ -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,