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

Re: [RFC] Make grafts versionable

From
HAH. Peter Anvin <hpa@zytor.com>
Date
Nov 21, 2005, 21:41 UTC
Message-ID
<43823EF6.6010302@zytor.com>
In-Reply-To
<Pine.LNX.4.64.0511211326110.13959@g5.osdl.org>
Linus Torvalds wrote:
Show 14 quoted lines
> 
> However, there's one fundamental reason:
> 
>  - if you have a file in ".git", that implies that even a "raw git repo" 
>    would have versions matter, since technically such a file would be 
>    inside the "raw" part. And that I find to be confusing. One of the 
>    whole points of a raw git repo is that because it doesn't have anything 
>    that is version-controlled and checked out, none of the branches or 
>    tags are special, and nothing needs to be updated when you push to such 
>    a repo.
> 
>    Now, if you have files in .git, suddenly that fundamental nature of a 
>    raw repository is no longer clear.
> 

Note that I didn't actually mean that they should necessarily represent files in .git/. The point was more that if we wanted to have version-controlled metadata, using .git/ as a namespace would be suitable.

In particular, I believe that if we ever do that, git should obtain this metadata from the repository/object database.

Show 14 quoted lines
> In general, making any internal git data versionable is very confusing. So 
> you make the grafts file versionable - that suddenly means that different 
> branches may have different parents for the same commit. And that 
> depending on which branch you have checked out, git-fsck-cache may result 
> in an error, or it may not. That's _nasty_, in my opinion.
> 
> So I much prefer to say: everything under ".git" is not versionable, for 
> the fundamental reason that the files under .git are "global" to that git 
> repository. 
> 
> And I think .git/grafts in particular makes no sense to version.
> 
> If you want to track a git "grafts" file, you can do it as another git 
> repository and a symlink.

I fully concur with this (as I pointed out in my post, although perhaps fuzzily.)

	-hpa
Previous: Linus TorvaldsNext: Johannes Schindelin
Message 4 of 5 in “[RFC] Make grafts versionable”
  1. Johannes SchindelinNov 21, 2005
  2. H. Peter AnvinNov 21, 2005
  3. Linus TorvaldsNov 21, 2005
  4. H. Peter AnvinNov 21, 2005
  5. Johannes SchindelinNov 22, 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.