{"thread":{"id":"37508","subject":"[PATCH] git svn: find-rev allows short switches for near matches","startedAt":"2014-09-07T08:35:19Z","lastAt":"2014-09-07T08:35:19Z","messageCount":1,"participants":["Eric Wong"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"249006","messageId":"20140907083519.GA11302@dcvr.yhbt.net","threadId":"37508","inReplyTo":null,"subject":"[PATCH] git svn: find-rev allows short switches for near matches","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2014-09-07T08:35:19Z","receivedAt":"2014-09-07T08:35:19Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Allow -B and -A to act as short aliases for --before and --after\noptions respectively.  This reduces typing and hopefully allows\nreuse of muscle memory for grep(1) users.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n Will push to git://bogomips.org/git-svn.git\n\n Documentation/git-svn.txt | 2 ++\n git-svn.perl              | 4 ++--\n 2 files changed, 4 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt\nindex 14036cf..ef8ef1c 100644\n--- a/Documentation/git-svn.txt\n+++ b/Documentation/git-svn.txt\n@@ -386,11 +386,13 @@ Any other arguments are passed directly to 'git log'\n \ttree-ish to specify which branch should be searched).  When given a\n \ttree-ish, returns the corresponding SVN revision number.\n +\n+-B;;\n --before;;\n \tDon't require an exact match if given an SVN revision, instead find\n \tthe commit corresponding to the state of the SVN repository (on the\n \tcurrent branch) at the specified revision.\n +\n+-A;;\n --after;;\n \tDon't require an exact match if given an SVN revision; if there is\n \tnot an exact match return the closest match searching forward in the\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 47cd6ea..a0ca31d 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -260,8 +260,8 @@ my %cmd = (\n \t\t\t} ],\n \t'find-rev' => [ \\&cmd_find_rev,\n \t                \"Translate between SVN revision numbers and tree-ish\",\n-\t\t\t{ 'before' => \\$_before,\n-\t\t\t  'after' => \\$_after } ],\n+\t\t\t{ 'B|before' => \\$_before,\n+\t\t\t  'A|after' => \\$_after } ],\n \t'rebase' => [ \\&cmd_rebase, \"Fetch and rebase your working directory\",\n \t\t\t{ 'merge|m|M' => \\$_merge,\n \t\t\t  'verbose|v' => \\$_verbose,\n-- \nEW\n"}]}