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

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

From
Phil Hord <phil.hord@gmail.com>
Date
Oct 29, 2012, 22:21 UTC
Message-ID
<CABURp0otR2S1aOAWwnaFYFGRi_2cCBODbghck-BqUTw2B_ci3A@mail.gmail.com>
In-Reply-To
<20121029213652.GC20513@sigill.intra.peff.net>
On Mon, Oct 29, 2012 at 5:36 PM, Jeff King <peff@peff.net> wrote:
Show 22 quoted lines
> On Mon, Oct 29, 2012 at 01:38:28PM -0400, Phil Hord wrote:
>
>> > I am not sure it is sufficient as-is, though. It does not seem to ever
>> > clear variables, only set them, which means that values could leak
>> > across iterations of the loop,  [...] E.g., when
>> > the first submodule has submodule.*.foo set but the second one does not,
>> > you will still end up with $submodule_foo set when you process the
>> > second one.
>>
>> Good point.  That should not happen.
>>
>> > or down to recursive calls.
>>
>> Frankly, I consider that to be a feature.  However, I can see how it
>> would be considered inconsistent in many ways, so it's probably best
>> to squash it.  :-\
>
> I think it would depend on the semantics of the option. Some options
> would probably make sense to apply recursively, and some not.
>
> Maybe instead of blindly converting config into the environment, it
> should forward or clear specific known-meaning config.

Well, that's where we started. I was aiming for the more generic "never needs updating" direction.

P
Previous: Jeff KingNext: Jeff King
Message 16 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.