git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/2] git-svn: dcommit should diff against the current HEAD after committing

From
EWEric Wong <normalperson@yhbt.net>
Date
Dec 27, 2006, 00:27 UTC
Message-ID
<11671792603888-git-send-email-normalperson@yhbt.net>
In-Reply-To
<1167179258485-git-send-email-normalperson@yhbt.net>

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>
---
 git-svn.perl |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 4288a05..c2cdceb 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/;
 	}
-- 
1.4.4.3.gd4ada
Previous: Eric Wong
Message 2 of 2 in “git-svn: quiet down tests and fix some unportable shell constructs”
  1. 1/2 git-svn: quiet down tests and fix some unportable shell constructsEric Wong, Dec 27, 2006
  2. 2/2 git-svn: dcommit should diff against the current HEAD after committingEric Wong, Dec 27, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.