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

Re: Multiple checkouts of the same repository

From
Junio C Hamano <junkio@cox.net>
Date
Oct 3, 2006, 07:59 UTC
Message-ID
<7vzmcdrfr6.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0610022234330.9789@iabervon.org>
Daniel Barkalow <barkalow@iabervon.org> writes:
Show 8 quoted lines
> At one point, I was arguing for storing the information of what commits 
> were the starting point of the current index in the index itself, instead 
> of relying on external files and external links to refs, but I wasn't 
> really working on git enough to argue for it effectively. Among other 
> things, it would allow git to know what's going on if the head changes 
> without the index getting updated. (Of course, all of the cases it 
> supports are really ones where git should just tell you that you've done 
> something wrong,...

I think if you really wanted to, you could put it in the index extension section along with the cache-tree data. We would need to implement a way to query and manipulate data in the index extension and update git-commit (it should check HEAD matches the commit you placed in the extension earlier, and after making a commit and updating HEAD, you should update the index with the new commit as well), git-checkout (after switching branches you should update the index with the branch head you switched to; I think you should sanity check before switching to see if the current index and HEAD are reasonable as well but I am not sure), git-reset --hard (set to the resetted HEAD), git-am, git-applymbox, and git-merge (check before and set after when successful).

Previous: Daniel Barkalow
Message 8 of 8 in “Multiple checkouts of the same repository”
  1. Matt McCutchenOct 1, 2006
  2. Johannes SchindelinOct 1, 2006
  3. Matt McCutchenOct 1, 2006
  4. Johannes SchindelinOct 1, 2006
  5. Matt McCutchenOct 1, 2006
  6. Johannes SchindelinOct 2, 2006
  7. Daniel BarkalowOct 3, 2006
  8. Junio C HamanoOct 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.