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

git-svn vs. $Id$

From
TVTommi Virtanen <tv@inoi.fi>
Date
May 16, 2006, 17:33 UTC
Message-ID
<446A0CCF.2060903@inoi.fi>

Hi. I just ran into trouble with git-svn, related to a file containing $Id$. Yes, I know $Id$ sucks and should be avoided, and I'll be removing them shortly, but that doesn't change the fact that the history contains files with them.

Just wanted to let you know of a workaround: manually edit the relevant file in .git/git-svn/tree/ to undo the $Id$ change, and git-svn fetch works again.

$ git-svn fetch
Tree mismatch, Got: c242bb60d78c1dfce133e0bbaca7f13895de00b2, Expected:
07d35ac911cc56aabea86f4467cafc1d92b724c4
 at /home/tv/bin/git-svn line 426
        main::assert_tree('a5890d459de08dc8adbbe34cdfb4b1f44f377ad8')
called at /home/tv/bin/git-svn line 392
        main::assert_svn_wc_clean(2039,
'a5890d459de08dc8adbbe34cdfb4b1f44f377ad8') called at
/home/tv/bin/git-svn line 262
        main::fetch() called at /home/tv/bin/git-svn line 105
$ git diff-tree -p 07d35ac911cc56aabea86f4467cafc1d92b724c4 \
  c242bb60d78c1dfce133e0bbaca7f13895de00b2
diff --git a/anonymized b/anonymized
index 16b3988..f43782a 100644
--- a/anonymized
+++ b/anonymized
@@ -1,4 +1,4 @@
-## $Id: anonymized 1775 2006-04-20 09:25:22Z tv $
+## $Id: anonymized 2025 2006-05-16 07:25:24Z tv $

 blah
 blah


So editing .git/git-svn/tree/anonymized and replacing
"1775 2006-04-20 09:25:22Z tv" with "2025 2006-05-16 07:25:24Z tv"
make git-svn happy again.
-- 
Inoi Oy, Tykistökatu 4 D (4. krs), FI-20520 Turku, Finland
http://www.inoi.fi/
Mobile +358 40 762 5656
Next: Linus Torvalds
Message 1 of 8 in “git-svn vs. $Id$”
  1. Tommi VirtanenMay 16, 2006
  2. Linus TorvaldsMay 16, 2006
  3. Tommi VirtanenMay 16, 2006
  4. Eric WongMay 21, 2006
  5. git-svn: ignore expansion of svn:keywordsEric Wong, May 21, 2006
  6. Eric WongMay 24, 2006
  7. git-svn: starting a 1.1.0-pre development versionEric Wong, May 24, 2006
  8. git-svn: ignore expansion of svn:keywordsEric Wong, May 24, 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.