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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Piotr Krukowiecki <piotr.krukowiecki@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]