From: Eric Wong Date: Wed, 27 Dec 2006 00:27:38 +0000 (-0800) Subject: git-svn: dcommit should diff against the current HEAD after committing X-Git-Tag: v1.5.0-rc1~190 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c3a41037ed5fa113c8eb0f67a1cc17654f7ce5b1;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/git-svn.perl b/git-svn.perl index 4288a05c1..c2cdceb1d 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -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/; }