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

Re: [PATCH 1/2 (v2)] submodule: no [--merge|--rebase] when newly cloned

From
Spencer E. Olson <olsonse@umich.edu>
Date
Feb 17, 2011, 22:17 UTC
Message-ID
<201102171517.15906.olsonse@umich.edu>
In-Reply-To
<7vzkpu9zo0.fsf@alter.siamese.dyndns.org>
This looks fine by me.

What about the testing patch? It'll be a few hours before I can resubmit with "git submodule status submodule" changed to "git status -s submodule".

On Thursday 17 February 2011 13:25, Junio C Hamano wrote:
Show 36 quoted lines
> Jens Lehmann <Jens.Lehmann@web.de> writes:
> > Am 17.02.2011 17:18, schrieb Spencer E. Olson:
> >> Previously, when a new submodule is cloned by running "git submodule
> >> update [--merge|--rebase]", the newly cloned submodule does not get
> >> checked out and a rebase or merge is incorrectly attempted against an
> >> empty working directory. This patch ignores --rebase or --merge for new
> >> submodules and instead simply checks out the appropriate revision.
> >
> > Nice work, thanks!
> >
> > Just a small thing: This problem also happens when the configuration
> > "submodule.<name>.update" is set to either "rebase" or "merge", not only
> > when using the command line options. So perhaps you could reword the
> > topic to something like "submodule: don't merge or rebase when newly
> > cloned" and adjust both commit messages a bit?
>
> I tentatively queued with this rewrite (the patch text is the same as the
> one I sent previously).
>
>     From: Spencer E. Olson <olsonse@umich.edu>
>     Date: Thu, 17 Feb 2011 09:18:45 -0700
>     Subject: [PATCH] submodule: no [--merge|--rebase] when newly cloned
>
>     "git submodule update" can be run with either the "--merge" or
> "--rebase" option, or submodule.<name>.update configuration variable can be
> set to "merge" or "rebase, to cause local work to get integrated when
> updating the submodule.
>
>     When a submodule is newly cloned, however, it does not have a check out
>     when a rebase or merge is attempted, leading to a failure.  For newly
>     cloned submodules, simply check out the appropriate revision.  There is
> no local work to integrate with for them.
>
>     Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
>     Acked-by: Jens Lehmann <Jens.Lehmann@web.de>
>     Signed-off-by: Junio C Hamano <gitster@pobox.com>
Previous: Junio C HamanoNext: Junio C Hamano
Message 8 of 11 in “submodule: no [--merge|--rebase] when newly cloned”
  1. 1/2 submodule: no [--merge|--rebase] when newly clonedSpencer E. Olson, Feb 17, 2011
  2. 2/2 t7406: "git submodule update {--merge|--rebase]" with new submodulesSpencer E. Olson, Feb 17, 2011
  3. Jens LehmannFeb 17, 2011
  4. Junio C HamanoFeb 17, 2011
  5. Jens LehmannFeb 17, 2011
  6. Jens LehmannFeb 17, 2011
  7. Junio C HamanoFeb 17, 2011
  8. Spencer E. OlsonFeb 17, 2011
  9. Junio C HamanoFeb 17, 2011
  10. Spencer E. OlsonFeb 17, 2011
  11. Junio C HamanoFeb 17, 2011

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.