All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Yanovich <ynvich@gmail.com>
To: git@vger.kernel.org, normalperson@yhbt.net, Matthieu.Moy@imag.fr
Cc: Sergey Yanovich <ynvich@gmail.com>
Subject: [PATCH 1/3] Accept root <tree-ish> in 'git-svn commit-diff'
Date: Mon, 18 Jun 2007 15:14:02 +0300	[thread overview]
Message-ID: <11821688461828-git-send-email-ynvich@gmail.com> (raw)
Message-ID: <4e79874760c3773448d886608d6db7bbda3c97f2.1182168501.git.ynvich@gmail.com> (raw)
In-Reply-To: <11821688443683-git-send-email-ynvich@gmail.com>
In-Reply-To: <vpqhcp6b85c.fsf@bauges.imag.fr>


Signed-off-by: Sergey Yanovich <ynvich@gmail.com>
---
 git-svn.perl |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index 50128d7..8ad291b 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2572,7 +2572,12 @@ sub generate_diff {
 	}
 	push @diff_tree, '--find-copies-harder' if $_find_copies_harder;
 	push @diff_tree, "-l$_rename_limit" if defined $_rename_limit;
-	push @diff_tree, $tree_a, $tree_b;
+	if ($tree_a eq '0000000000000000000000000000000000000000') {
+		push @diff_tree, '--root';
+	} else {
+		push @diff_tree, $tree_a;
+	}
+	push @diff_tree, $tree_b;
 	my ($diff_fh, $ctx) = command_output_pipe(@diff_tree);
 	local $/ = "\0";
 	my $state = 'meta';
@@ -2606,6 +2611,8 @@ sub generate_diff {
 			}
 			$x->{file_b} = $_;
 			$state = 'meta';
+		} elsif ($state eq 'meta' && $_ eq $tree_b &&
+			$tree_a eq '0000000000000000000000000000000000000000') {
 		} else {
 			croak "Error parsing $_\n";
 		}
-- 
1.5.2.1

  parent reply	other threads:[~2007-06-18 12:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-17 18:49 git tool to keep a subversion mirror Sergey Yanovich
2007-06-17 21:09 ` Matthieu Moy
2007-06-18  6:42   ` Sergey Yanovich
2007-06-18 12:14   ` Sergey Yanovich [this message]
2007-06-18 12:14     ` [PATCH 1/3] Accept root <tree-ish> in 'git-svn commit-diff' Sergey Yanovich
2007-06-18 13:20       ` Johannes Sixt
2007-06-18 12:14     ` [PATCH 2/3] 'git-svndump' Sergey Yanovich
2007-06-18 12:14       ` Sergey Yanovich
2007-06-18 12:26         ` Charlie Shepherd
2007-06-18 12:14     ` [PATCH 3/3] Fix large-scale exports by 'git-svndump' Sergey Yanovich
2007-06-18 12:14       ` Sergey Yanovich
2007-06-18 13:22         ` Johannes Sixt
2007-06-24  7:45 ` git tool to keep a subversion mirror Jan Hudec
  -- strict thread matches above, loose matches on Subject: below --
2007-06-18 12:14 Sergey Yanovich
2007-06-19  6:54 ` [PATCH 1/3] Accept root <tree-ish> in 'git-svn commit-diff' Sergey Yanovich
2007-06-19  6:54   ` Sergey Yanovich
2007-06-19  6:54   ` [PATCH 2/3] 'git-svndump' Sergey Yanovich
2007-06-19  6:54     ` Sergey Yanovich
2007-06-20  6:40     ` Eric Wong
2007-06-20  9:47       ` Sergey Yanovich
2007-06-19  6:54   ` [PATCH 3/3] Fix large-scale exports by 'git-svndump' Sergey Yanovich
2007-06-19  6:54     ` Sergey Yanovich
2007-06-20  6:25   ` [PATCH 1/3] Accept root <tree-ish> in 'git-svn commit-diff' Eric Wong
2007-06-20  9:20     ` Sergey Yanovich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11821688461828-git-send-email-ynvich@gmail.com \
    --to=ynvich@gmail.com \
    --cc=Matthieu.Moy@imag.fr \
    --cc=git@vger.kernel.org \
    --cc=normalperson@yhbt.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.