From: Sergey Yanovich <ynvich@gmail.com>
To: git@vger.kernel.org, normalperson@yhbt.net
Cc: Sergey Yanovich <ynvich@gmail.com>
Subject: [PATCH 1/2] Accept root <tree-ish> in 'git-svn commit-diff'
Date: Sun, 17 Jun 2007 22:38:56 +0300 [thread overview]
Message-ID: <11821091373927-git-send-email-ynvich@gmail.com> (raw)
In-Reply-To: <11821091373273-git-send-email-ynvich@gmail.com>
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
next prev parent reply other threads:[~2007-06-17 19:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-17 19:38 git tool to keep a subversion mirror Sergey Yanovich
2007-06-17 19:38 ` Sergey Yanovich [this message]
2007-06-17 19:38 ` [PATCH 2/2] 'git-svndump' 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=11821091373927-git-send-email-ynvich@gmail.com \
--to=ynvich@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).