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

Re: [PATCH] Teach git submodule update to use distributed repositories

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 18, 2008, 09:00 UTC
Message-ID
<7vwsjj8t3s.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<m363r3y42v.fsf@localhost.localdomain>
Jakub Narebski <jnareb@gmail.com> writes:
Show 8 quoted lines
> "Nigel Magnay" <nigel.magnay@gmail.com> writes:
>
>> Fred is a person (and != origin). His tree(s) are entirely correct and
>> consistent, and he doesn't yet wish to push to origin (and perhaps he
>> cannot, because he does not have permission to do so).
>> ...
> I _think_ that you can currently work around this problem by using
> URL rewriting (url.<base>.insteadOf).
Doesn't it also involve config modification?

I think the right thing to do for this kind of "trial merge" should be the same as cases that do not involve submodules. You *DO NOT* give a handy way to muck with your configuration to make "origin" point at fred. Instead, you would do something like:

	$ git fetch ../fred master
        $ git checkout FETCH_HEAD
        ... review test fix ...
	... when you are done, go back, discarding the state from Fred
        $ git checkout master

What submodule changes from the above workflow would be what happens after you switch to the trial state (the above example detaches HEAD temporarily while peeking into Fred's history). It is understandable that you would want to script something that recurses into the submodules that you have checked out (or submodules that Fred wants you to look at), do the equivalent of "git fetch ../fred" you did at the toplevel to automate that step, but I very much agree with Pasky here in that it feels very wrong to hijack "submodule update" for it.

Previous: Jakub NarebskiNext: Jakub Narebski
Message 12 of 23 in “Teach git submodule update to use distributed repositories”
  1. Teach git submodule update to use distributed repositoriesNigel Magnay, Jul 17, 2008
  2. Johannes SchindelinJul 17, 2008
  3. Petr BaudisJul 17, 2008
  4. Nigel MagnayJul 17, 2008
  5. Johannes SchindelinJul 17, 2008
  6. Nigel MagnayJul 17, 2008
  7. Johannes SchindelinJul 17, 2008
  8. Nigel MagnayJul 17, 2008
  9. Petr BaudisJul 17, 2008
  10. Nigel MagnayJul 18, 2008
  11. Jakub NarebskiJul 18, 2008
  12. Junio C HamanoJul 18, 2008
  13. Jakub NarebskiJul 18, 2008
  14. Nigel MagnayJul 18, 2008
  15. Petr BaudisJul 18, 2008
  16. Nigel MagnayJul 18, 2008
  17. Petr BaudisJul 18, 2008
  18. Nigel MagnayJul 18, 2008
  19. Petr BaudisJul 18, 2008
  20. Nigel MagnayJul 18, 2008
  21. Petr BaudisJul 18, 2008
  22. Mark LevedahlJul 18, 2008
  23. Nigel MagnayJul 21, 2008

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.