summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b805b44)
raw | patch | inline | side by side (parent: b805b44)
author | Eric Wong <normalperson@yhbt.net> | |
Mon, 22 Jan 2007 23:22:50 +0000 (15:22 -0800) | ||
committer | Eric Wong <normalperson@yhbt.net> | |
Fri, 23 Feb 2007 08:57:09 +0000 (00:57 -0800) |
Any operations on the index in Git::SVN that is not wrapped by
tmp_index_do() is wrong.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
tmp_index_do() is wrong.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
git-svn.perl | patch | blob | history | |
t/t9104-git-svn-follow-parent.sh | patch | blob | history |
diff --git a/git-svn.perl b/git-svn.perl
index f01fb9a35d55dd2e6499ef0df884188f5c839910..88c022701de2d14af64271caf3a9b9ee88970f82 100755 (executable)
--- a/git-svn.perl
+++ b/git-svn.perl
}
if (defined $r0 && defined $parent && $gs->revisions_eq($r0, $r)) {
print STDERR "Found branch parent: ($self->{ref_id}) $parent\n";
- command_noisy('read-tree', $parent);
+ $self->assert_index_clean($parent);
my $ed;
if ($self->ra->can_do_switch) {
print STDERR "Following parent with do_switch\n";
index 3afec978d6a76894f9d3b6e434be56ec285f6a4d..402b614c76ffc53c4e2904b85fee94719519e7d1 100755 (executable)
sed -n -e '3p'\`\" = goodbye
"
+test_expect_success 'follow deleted parent' "
+ svn cp -m 'resurrecting trunk as junk' \
+ -r2 $svnrepo/trunk $svnrepo/junk &&
+ git-repo-config --add svn-remote.git-svn.fetch \
+ junk:refs/remotes/svn/junk &&
+ git-svn fetch --follow-parent -i svn/thunk &&
+ git-svn fetch -i svn/junk --follow-parent &&
+ test -z \"\`git diff svn/junk svn/trunk\`\" &&
+ test \"\`git merge-base svn/junk svn/trunk\`\" \
+ = \"\`git rev-parse svn/trunk\`\"
+ "
+
test_debug 'gitk --all &'
test_done