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

Re: Bootstrapping into git, commit gripes at me

From
Linus Torvalds <torvalds@osdl.org>
Date
Jul 12, 2005, 16:48 UTC
Message-ID
<Pine.LNX.4.58.0507120938240.17536@g5.osdl.org>
In-Reply-To
<20050712074801.GD6363@pasky.ji.cz>
On Tue, 12 Jul 2005, Petr Baudis wrote:
> 
> Could we please have the branch name written to .git/head-name in case
> we switch the branch?

I wouldn't mind per se, but on the other hand I really _hate_ having "parallel" information that can get out of sync. If you have two places holding the same information, they had better match. And this is something that sounds like it could very easily start to not match, and then we're screwed.

So I'd _much_ rather see instead:
 - .git/head-name is a cogito-specific thing that is only active while 
   cogito is _seeking_. So then "cg-unseek" ends up being pretty much 
   equivalent to
	[ -e .git/head-name ] || die "You weren't seeking"
	git checkout $(cat .git/head-name)
	rm .git/head-name
   This way "head-name" is really never even supposed to be "in sync" with 
   .git/HEAD, and there are no synchronization issues. 
 - in order for a "git checkout" to not get confused and possibly throwing 
   a cogito temporary head away (and so that git-fsck-cache is happy 
   during a seek), would it be possible to make "seek" use a real 
   temporary branch instead? Ie, "cg-seek" would be something like
	[ -e .git/head-name ] && die "You are already seeking"
	readlink .git/HEAD > .git/head-name
	echo $seekpoint > .git/refs/heads/cg-seek-point
	git checkout -f cg-seek-point
   or similar?

Then "cg-seek" and "cg-unseek" would continue to work, but the core git layer would never be confused because they're really using normal branches?

		Linus
Previous: Junio C HamanoNext: Petr Baudis
Message 20 of 33 in “Bootstrapping into git, commit gripes at me”
  1. Marc SingerJul 8, 2005
  2. Linus TorvaldsJul 9, 2005
  3. Marc SingerJul 11, 2005
  4. Junio C HamanoJul 11, 2005
  5. Junio C HamanoJul 11, 2005
  6. Linus TorvaldsJul 12, 2005
  7. Linus TorvaldsJul 12, 2005
  8. Marc SingerJul 12, 2005
  9. Linus TorvaldsJul 12, 2005
  10. Linus TorvaldsJul 12, 2005
  11. Linus TorvaldsJul 12, 2005
  12. Marc SingerJul 12, 2005
  13. Linus TorvaldsJul 12, 2005
  14. Marc SingerJul 12, 2005
  15. Petr BaudisJul 12, 2005
  16. Junio C HamanoJul 12, 2005
  17. Matthias UrlichsJul 12, 2005
  18. Petr BaudisJul 24, 2005
  19. Junio C HamanoJul 24, 2005
  20. Linus TorvaldsJul 12, 2005
  21. Petr BaudisAug 12, 2005
  22. Junio C HamanoJul 12, 2005
  23. Linus TorvaldsJul 12, 2005
  24. Junio C HamanoJul 12, 2005
  25. Linus TorvaldsJul 12, 2005
  26. Marc SingerJul 12, 2005
  27. Daniel BarkalowJul 12, 2005
  28. Linus TorvaldsJul 11, 2005
  29. Marc SingerJul 9, 2005
  30. Matthias UrlichsJul 9, 2005
  31. Petr BaudisJul 10, 2005
  32. Marc SingerJul 9, 2005
  33. Junio C HamanoJul 9, 2005

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.