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

Re: Recording merges after repo conversion

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Oct 31, 2007, 16:43 UTC
Message-ID
<alpine.LFD.0.999.0710310928490.3340@woody.linux-foundation.org>
In-Reply-To
<Pine.LNX.4.64.0710311553510.4362@racer.site>
On Wed, 31 Oct 2007, Johannes Schindelin wrote:
> 
> Seriously, your proposal does not make any sense.  If you have to set up a 
> hook to get the _sane_ behaviour, something is really wrong.  So I do not 
> really understand why you brought up this idea here and now.

Well, I think this does kind of have some commonality with another issue that has come up before: git clone only clones the really core repository data.

That's generally a big feature, and I think it's absolutely the correct thing to do.

But I can also see that sometimes, you might want to clone more than the actual repository, and get things like SVN metadata, branch reflogs, various hooks and all the config options too.

Of course, in practice, at least right now, the right thing to do for that is to just do a recursive filesystem copy and then a "git status", but I think the background here is that some people simply do end up wanting to transfer more infrastructure than just the actual repository data.

One thing to note: one reason for *not* allowing that is that incremental upgrades of non-repo data is obviously not possible. You might be able to *clone* a repo with config info and other metadata (if nothing else, then by just doing that raw filesystem copy), but you will never ever be able to _fetch_ the updates, because they aren't part of the core repository, and aren't versioned.

So I think I can understand why some people would want to do things like this, but I do think it's broken. Yes, you can make the grafts file (or the config file) be part of the repo, and even just add a symlink to your .git/ directory, but it's simply not a very good model.

So I think it always does end up breaking (other people might rebase, and break your grafts, or just not want them in the first place, or they don't care about the same things, and mess up "your" configuration etc etc). So the git repo layout is designed to have the minimally required shared state, and not anything else.

		Linus
Previous: Johannes SchindelinNext: Johan Herland
Message 18 of 21 in “Recording merges after repo conversion”
  1. Peter KarlssonOct 9, 2007
  2. Benoit SIGOUREOct 9, 2007
  3. Peter KarlssonOct 30, 2007
  4. Lars HjemliOct 30, 2007
  5. Peter KarlssonOct 30, 2007
  6. Lars HjemliOct 30, 2007
  7. Johannes SchindelinOct 31, 2007
  8. Peter KarlssonOct 31, 2007
  9. Johannes SchindelinOct 31, 2007
  10. Peter KarlssonOct 31, 2007
  11. Johannes SchindelinOct 31, 2007
  12. Johan HerlandOct 31, 2007
  13. Johannes SchindelinOct 31, 2007
  14. Johan HerlandOct 31, 2007
  15. Johannes SchindelinOct 31, 2007
  16. Johan HerlandOct 31, 2007
  17. Johannes SchindelinOct 31, 2007
  18. Linus TorvaldsOct 31, 2007
  19. Johan HerlandOct 31, 2007
  20. Johannes SchindelinOct 30, 2007
  21. Peter KarlssonOct 31, 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.