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

Re: git-svn: .git/svn disk usage

From
Steven Grimm <koreth@midwinter.com>
Date
Dec 5, 2007, 21:30 UTC
Message-ID
<6D1288C9-8FD7-40CB-BA0B-0032F8D2DA6A@midwinter.com>
In-Reply-To
<20071205085451.GA347@soma>

How about using git itself to keep some of this information? I'll just throw this idea out there; might or might not make any actual sense.

Create a new "git-svn metadata" branch. This branch contains a fake directory (never intended for checkout, though you could do it) that has a "file" for each svn revision. The filename is just the svn revision number, maybe divided into subdirectories in case you want to check the branch out for debugging purposes or whatever. The contents are the git commit SHA1 and whatever other metadata you want to keep in the future.

The advantage of doing it this way? You can pass around svn metadata using the normal git fetch/push tools, query the metadata using "git show", etc. In terms of data integrity, it's as secure as anything else in a git repository, much more so than a separately maintained db file under .git.

Along similar lines, a separate branch where the filenames are commit SHA1s and the file contents are the stuff that currently gets written into the git-svn-id: lines would mean no more need to rewrite history when doing dcommit, and thus easier mixing of native git workflows and interactions with an svn repository.

It would be great if you could clone a git-svn repository and then do "git svn dcommit" from the clone, secure in the knowledge that things will stay consistent even if the origin gets your changes via "git svn fetch" rather than from you.

-Steve
Previous: Eric WongNext: Eric Wong
Message 9 of 10 in “git-svn: .git/svn disk usage”
  1. Ollie WildDec 3, 2007
  2. Pascal ObryDec 3, 2007
  3. David BrownDec 3, 2007
  4. Kelvie WongDec 3, 2007
  5. Ollie WildDec 3, 2007
  6. Karl HasselströmDec 4, 2007
  7. David VoitDec 3, 2007
  8. Eric WongDec 5, 2007
  9. Steven GrimmDec 5, 2007
  10. Eric WongDec 6, 2007

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.