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

[PATCH 3/9] contrib/git-svn: strip 'git-svn-id:' when commiting to SVN

From
EWEric Wong <normalperson@yhbt.net>
Date
Mar 3, 2006, 09:20 UTC
Message-ID
<11413776082010-git-send-email-normalperson@yhbt.net>
In-Reply-To
<114137760733-git-send-email-normalperson@yhbt.net>

We regenerate and use git-svn-id: whenever we fetch or otherwise commit to remotes/git-svn. We don't actually know what revision number we'll commit to SVN at commit time, so this is useless. It won't throw off things like 'rebuild', though, which knows to only use the last instance of git-svn-id: in a log message

Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
 contrib/git-svn/git-svn.perl |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
15b28ddfc496fa88cffdfddcc9262cae635a34d0
diff --git a/contrib/git-svn/git-svn.perl b/contrib/git-svn/git-svn.perl
index 67368a5..edae9d4 100755
--- a/contrib/git-svn/git-svn.perl
+++ b/contrib/git-svn/git-svn.perl
@@ -625,6 +625,9 @@ sub svn_commit_tree {
 		while (<$msg_fh>) {
 			if (!$in_msg) {
 				$in_msg = 1 if (/^\s*$/);
+			} elsif (/^git-svn-id: /) {
+				# skip this, we regenerate the correct one
+				# on re-fetch anyways
 			} else {
 				print $msg $_ or croak $!;
 			}
-- 
1.2.3.g4676
Previous: Eric WongNext: Eric Wong
Message 2 of 3 in “contrib/git-svn: several small bug fixes and changes”
  1. 2/9 contrib/git-svn: several small bug fixes and changesEric Wong, Mar 3, 2006
  2. 3/9 contrib/git-svn: strip 'git-svn-id:' when commiting to SVNEric Wong, Mar 3, 2006
  3. 4/9 contrib/git-svn: allow --authors-file to be specifiedEric Wong, Mar 3, 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.