Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH/RFC] git-svn: remove auto_abbrev (Getopt::Long option)

From: Eric Wong <hidden>
Date: 2016-06-15 22:51:49
Subsystem: the rest · Maintainer: Linus Torvalds

Piotr Krukowiecki [off-list ref] wrote:
RFC because this changes user interface (no option abbreviation),
but I know no other good way to fix the --author problem.

The --author option would be useful, because I usually use
  git svn log --oneline
and paste the changes with svn revision numbers to bugzilla etc.

All tests pass with this change.
How about minimizing the impact and potential breakage with this?

(I'm not sure if "blame" benefits/hurts from this, I almost never
use any form of it)
diff --git a/git-svn.perl b/git-svn.perl
index 96f373f..ba382eb 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -298,6 +298,9 @@ my %opts = %{$cmd{$cmd}->[2]} if (defined $cmd);
 read_git_config(\%opts);
 if ($cmd && ($cmd eq 'log' || $cmd eq 'blame')) {
 	Getopt::Long::Configure('pass_through');
+	if ($cmd eq 'log') {
+		Getopt::Long::Configure('no_auto_abbrev');
+	}
 }
 my $rv = GetOptions(%opts, 'help|H|h' => \$_help, 'version|V' => \$_version,
                     'minimize-connections' => \$Git::SVN::Migration::_minimize,
-- 
Eric Wong
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help