@matheusbsbs / matheus-bagliano / commits / c3a41037ed
Fork 0

git-svn: dcommit should diff against the current HEAD after committing

This is a followup to dd31da2fdc199132c9fd42023aea5b33672d73cc. 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>

Eric Wong committed Dec 26, 2006 at 16:27 UTC c3a41037ed5fa113c8eb0f67a1cc17654f7ce5b1
1 file changed +3 -3
git-svn.perl
+3 -3
@@ -512,15 +512,15 @@ sub dcommit {
512 }
513 return if $_dry_run;
514 fetch();
515 - my @diff = command('diff-tree', $head, $gs, '--');
515 + my @diff = command('diff-tree', 'HEAD', $gs, '--');
516 my @finish;
517 if (@diff) {
518 @finish = qw/rebase/;
519 push @finish, qw/--merge/ if $_merge;
520 push @finish, "--strategy=$_strategy" if $_strategy;
521 - print STDERR "W: $head and $gs differ, using @finish:\n", @diff;
521 + print STDERR "W: HEAD and $gs differ, using @finish:\n", @diff;
522 } else {
523 - print "No changes between current $head and $gs\n",
523 + print "No changes between current HEAD and $gs\n",
524 "Resetting to the latest $gs\n";
525 @finish = qw/reset --mixed/;
526 }