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

Re: [PATCH] Fix 'git checkout <submodule>' to update the index

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Apr 2, 2009, 20:27 UTC
Message-ID
<alpine.DEB.1.00.0904022227400.7464@intel-tinevez-2-302>
In-Reply-To
<7vprfuesra.fsf@gitster.siamese.dyndns.org>
Hi,
On Thu, 2 Apr 2009, Junio C Hamano wrote:
Show 24 quoted lines
> Johannes Schindelin <johannes.schindelin@gmx.de> writes:
> 
> > While 'git checkout <submodule>' should not update the submodule's
> > working directory, it should update the index.  This is in line with
> > how submodules are handled in the rest of Git.
> >
> > While at it, test 'git reset [<commit>] <submodule>', too.
> >
> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> > ---
> >
> > 	I have no idea who thought that it would be a good idea to leave 
> > 	the submodules alone, but I think it is highly counterintuitive 
> > 	that
> >
> > 		git checkout <submodule>
> >
> > 	does not touch the index.
> 
> I do not see anything that treats submodule specially in the scripted 
> version and this check for S_ISGITLINK() has been there since the very 
> beginning of C rewrite 782c2d6 (Build in checkout, 2008-02-07), so it is 
> a regression fix that can go to maint (all the way down to 1.5.5 if you 
> want).
I would appreciate that.

Thanks, Dscho

Previous: Junio C Hamano
Message 3 of 3 in “Fix 'git checkout <submodule>' to update the index”
  1. Fix 'git checkout <submodule>' to update the indexJohannes Schindelin, Apr 2, 2009
  2. Junio C HamanoApr 2, 2009
  3. Johannes SchindelinApr 2, 2009

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.