Skip to content

Commit

Permalink
git-svn: dcommit should diff against the current HEAD after committing
Browse files Browse the repository at this point in the history
This is a followup to dd31da2.
Regardless of whether we commit an alternate head, we always
diff-tree based on the current HEAD, and rebase against our
remote reference as necessary.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Eric Wong authored and Junio C Hamano committed Dec 27, 2006
1 parent 39ed7c1 commit c3a4103
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -512,15 +512,15 @@ sub dcommit {
}
return if $_dry_run;
fetch();
my @diff = command('diff-tree', $head, $gs, '--');
my @diff = command('diff-tree', 'HEAD', $gs, '--');
my @finish;
if (@diff) {
@finish = qw/rebase/;
push @finish, qw/--merge/ if $_merge;
push @finish, "--strategy=$_strategy" if $_strategy;
print STDERR "W: $head and $gs differ, using @finish:\n", @diff;
print STDERR "W: HEAD and $gs differ, using @finish:\n", @diff;
} else {
print "No changes between current $head and $gs\n",
print "No changes between current HEAD and $gs\n",
"Resetting to the latest $gs\n";
@finish = qw/reset --mixed/;
}
Expand Down

0 comments on commit c3a4103

Please sign in to comment.