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

Re: git-svn and huge data and modifying the git-svn-HEAD branch directly

From
Andreas Ericsson <ae@op5.se>
Date
Mar 1, 2006, 16:07 UTC
Message-ID
<4405C6BE.2000706@op5.se>
In-Reply-To
<Pine.LNX.4.64.0603010745320.22647@g5.osdl.org>
Linus Torvalds wrote:
Show 27 quoted lines
> 
> On Wed, 1 Mar 2006, Andreas Ericsson wrote:
> 
>>Eric Wong wrote:
>>
>>>Should rev-parse be taught to be less strict and look for basenames
>>>that can't be found in heads/ and tags/ in other directories?
>>
>>It already does. The search order is this, for a ref named 'foo':
>>	$GIT_DIR/foo
>>	$GIT_DIR/refs/foo
>>	$GIT_DIR/refs/tags/foo
>>	$GIT_DIR/refs/heads/foo
> 
> 
> Yes, but I think Eric wanted to avoid having to write the prefix part, 
> which git won't let you do right now.
> 
> If you have a ref in .git/refs/svn-tracker/git-svn-HEAD, you would have to 
> write out all of "svn-tracker/git-svn-HEAD", because unlike a "real 
> branch", get_sha1() won't look into the "svn-tracker" without it being 
> explicitly mentioned.
> 
> Now, some tools will actually do "for_each_ref()" and check the ref-name 
> against each of them (so if you pass in "foo", it will check them afainst 
> _any_ ref-subdirectory that contains "foo"). But get_sha1() won't.
> 
Didn't know that. The day is not a complete waste then.
Show 12 quoted lines
> We could fix get_sha1(), but part of the logic was that other 
> subdirectories are special, and as such they _should_ be mentioned, so 
> that a file in such a special directory isn't ever confused with a real 
> branch.
> 
> But if you were to use for example .git/refs/git-svn/tracking as the 
> svn-tracking reference head, and then you'd be perfectly able to use
> 
> 	git log git-svn/tracking..
> 
> to see what you've done since the last svn import?
> 

Personally I'm all for namespace separation. I'm assuming the script has the tracker-branch hardcoded anyway, so I don't really understand why it would be necessary to keep other refs in a separate directory and, if it *is* necessary, why that subdirectory can't be .git/refs/heads/svn.

Eric mentioned earlier that the tracking-branch can't be committed to (ever), so the user convenience for searching other directories should be nearly non-existant.

Perhaps I'm missing something obvious. Perhaps I'm just stupid. Perhaps the pub just opened and I don't feel like reading it twice to make sure I understood. ;)

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Previous: Linus TorvaldsNext: Linus Torvalds
Message 11 of 33 in “git-svn and huge data and modifying the git-svn-HEAD branch directly”
  1. Nicolas Vilz 'niv'Feb 27, 2006
  2. Eric WongFeb 27, 2006
  3. Jan HarkesFeb 27, 2006
  4. Eric WongFeb 27, 2006
  5. Martin LanghoffFeb 28, 2006
  6. Linus TorvaldsFeb 28, 2006
  7. Martin LanghoffFeb 28, 2006
  8. Eric WongMar 1, 2006
  9. Andreas EricssonMar 1, 2006
  10. Linus TorvaldsMar 1, 2006
  11. Andreas EricssonMar 1, 2006
  12. Linus TorvaldsMar 1, 2006
  13. Josef WeidendorferMar 1, 2006
  14. Shawn PearceMar 1, 2006
  15. Linus TorvaldsMar 1, 2006
  16. Josef WeidendorferMar 1, 2006
  17. Linus TorvaldsMar 1, 2006
  18. Josef WeidendorferMar 1, 2006
  19. Linus TorvaldsMar 1, 2006
  20. Junio C HamanoMar 1, 2006
  21. Josef WeidendorferMar 1, 2006
  22. Martin LanghoffMar 1, 2006
  23. Carl WorthMar 1, 2006
  24. Linus TorvaldsMar 1, 2006
  25. Johannes SchindelinMar 1, 2006
  26. Petr BaudisMar 19, 2006
  27. Linus TorvaldsMar 19, 2006
  28. Junio C HamanoMar 19, 2006
  29. contrib/git-svn: tell the user to not modify git-svn-HEAD directlyEric Wong, Feb 27, 2006
  30. Nicolas Vilz 'niv'Feb 27, 2006
  31. Eric WongFeb 27, 2006
  32. Nicolas Vilz 'niv'Feb 27, 2006
  33. contrib/git-svn: correct commit example in manpageEric Wong, Feb 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.