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

Re: [PATCH v2] git-submodule add: Add -r/--record option.

From
W. Trevor King <wking@tremily.us>
Date
Oct 28, 2012, 22:34 UTC
Message-ID
<20121028223431.GF26675@odin.tremily.us>
In-Reply-To
<CAJo=hJt_A5FCCcvR=sZ5Ni+-ZGq+MjxqkONbh9k+A46xBH9jzA@mail.gmail.com>
On Sun, Oct 28, 2012 at 02:59:33PM -0700, Shawn Pearce wrote:
Show 7 quoted lines
> Looks like the Gerrit meaning is basically the same as Ævar's. Gerrit
> updates the parent project as if you had done:
> 
>   $ git submodule foreach 'git checkout $(git config --file
> $toplevel/.gitmodules submodule.$name.branch) && git pull'
>   $ git commit -a -m "Updated submodules"
>   $ git push
Ah, good, then we *are* all using the option for the same thing.
Show 15 quoted lines
> On Tue, Oct 23, 2012 at 2:57 PM, W. Trevor King <wking@tremily.us> wrote:
> > I'm not clear on what that means, but they accept special values like
> > '.', so their usage is not compatible with Ævar's proposal.
> 
> "." is a special value to mean use the parent project's branch name.
> So its more like this:
> 
>   $ git submodule foreach 'git checkout $(git --git-dir $toplevel/.git
> read-ref HEAD | sed s,^refs/heads/,,) && git pull'
>   $ git commit -a -m "Updated submodules"
>   $ git push
> 
> We use "." in Gerrit to make branching an entire forest of projects
> easier. Setting up dev-fix-yy in the parent project will automatically
> track dev-fix-yy in each submodule.

Ok. If we wanted "." expansion to be a general submodule thing, it would add a special case to Phil's submodule_<var-name> export. I don't think such a special case would be worth the mental overhead, but obviously the Gerrit folks think it is. I don't care either way on this one.

Trevor
-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
Previous: Shawn PearceNext: Jeff King
Message 8 of 19 in “Re: [PATCH] git-submodule add: Record branch name in .gitmodules”
  1. W. Trevor KingOct 23, 2012
  2. git-submodule add: Add -r/--record option.W. Trevor King, Oct 23, 2012
  3. Jens LehmannOct 24, 2012
  4. W. Trevor KingOct 25, 2012
  5. Jens LehmannOct 28, 2012
  6. W. Trevor KingOct 28, 2012
  7. Shawn PearceOct 28, 2012
  8. W. Trevor KingOct 28, 2012
  9. Jeff KingOct 29, 2012
  10. W. Trevor KingOct 29, 2012
  11. Jeff KingOct 29, 2012
  12. W. Trevor KingOct 29, 2012
  13. Jeff KingOct 29, 2012
  14. Phil HordOct 29, 2012
  15. Jeff KingOct 29, 2012
  16. Phil HordOct 29, 2012
  17. Jeff KingOct 29, 2012
  18. W. Trevor KingOct 25, 2012
  19. Jeff KingOct 26, 2012

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.