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

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

From
Jeff King <peff@peff.net>
Date
Oct 29, 2012, 10:58 UTC
Message-ID
<20121029105855.GA15075@sigill.intra.peff.net>
In-Reply-To
<20121029104544.GA2424@odin.tremily.us>
On Mon, Oct 29, 2012 at 06:45:44AM -0400, W. Trevor King wrote:
Show 19 quoted lines
> > > Ah, good, then we *are* all using the option for the same thing.
> > 
> > That makes me more comfortable. Your patch adds support for setting the
> > variable initially. Does it need any special magic for maintenance, or
> > is it something that would always be updated by hand?
> 
> Everyone we've heard from so far interprets the setting as “pull from
> $branch in the remote repository $url to update the submodule”.  With
> Phil's export, that would become
> 
>   $ git submodule foreach 'git checkout "$submodule_branch" && git pull'
>   $ git commit -a -m "Updated submodules"
>   $ git push
> 
> As Nahor mentioned on the 23rd, there are a number of ways that the
> upstream branch could disappear, but Git has no way to know what the
> new branch setting should be.  This means that even if we make “pull
> from $branch” interpretation official, we still couldn't do anything
> slick about updating it.  So, yes, it will be updated by hand.
OK.

Can you send an updated version of the patch that summarizes the situation in the commit message?

I also think it is probably worth saying something in the documentation for the feature like "Note that this value is not actually used by git; however, some external tools and workflows may make use of it."

-Peff
Previous: W. Trevor KingNext: W. Trevor King
Message 11 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.