From: ojab Date: Tue, 04 Jun 2013 07:32:56 GMT Subject: [PATCH] Fix `git svn rebase` if top-level HEAD directory exist Message-ID: <51AD9828.7080508@ojab.ru> Oh hai! I have a svn repo with the top-level directory named HEAD and `git svn rebase [HEAD] [--]` fails with > $ git svn rebase > fatal: ambiguous argument 'HEAD': both revision and filename > Use '--' to separate paths from revisions, like this: > 'git [...] -- [...]' > rev-list --first-parent --pretty=medium HEAD: command returned error: 128 Works fine with patch in the attached file. please review. //wbr ojab From 522cbc8b8a7c4f2ab4268551a550585753164677 Mon Sep 17 00:00:00 2001 From: ojab Date: Tue, 4 Jun 2013 11:28:16 +0400 Subject: [PATCH] Fix `git svn rebase` if top-level HEAD directory exist Signed-off-by: ojab --- git-svn.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-svn.perl b/git-svn.perl index d070de0..e35a66a 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -1932,7 +1932,7 @@ sub cmt_sha2rev_batch { sub working_head_info { my ($head, $refs) = @_; my @args = qw/rev-list --first-parent --pretty=medium/; - my ($fh, $ctx) = command_output_pipe(@args, $head); + my ($fh, $ctx) = command_output_pipe(@args, $head, "--"); my $hash; my %max; while (<$fh>) { -- 1.8.2