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

Re: git-mv-submodule

From
fREW Schmidt <frioux@gmail.com>
Date
Dec 21, 2013, 16:23 UTC
Message-ID
<20131221162332.GB7917@wanderlust>
In-Reply-To
<52B5BD1B.5090705@web.de>
On Sat, Dec 21, 2013 at 05:08:59PM +0100, Jens Lehmann wrote:
Show 5 quoted lines
> Am 21.12.2013 10:48, schrieb fREW Schmidt:
> Thanks for sharing! Form a cursory look over your perl script it
> looks like it does what stock "git mv" will do since 1.8.5 (except
> for changing the name of the submodule, which I would not advise
> to do when only moving the submodule location in the work tree).

See, I thought I read that in the changelog; unfortunately I don'g thing it does the final set of book-keeping (changing the .git file if you changed the depth of the submodule in the mv and changing the path of the worktree in the actual git repo in .git/modules)

I'd love to be wrong on that as this script is clearly not perfect. I think my second little script in my previous email re git submodule bugs shows the issue. I'll include it here for simplicity though:

 mkdir -p test/a test/b
 cd test/a
 git init
 touch a.txt
 git add a.txt
 git ci -m 'initial commit'
 cd ../b
 git init
 mkdir c
 touch c/c.txt
 git submodule add ../a c/a
 git ci -m 'initial commit'
 git mv c d
 git status
-- 
fREW Schmidt
http://blog.afoolishmanifesto.com
Previous: Jens Lehmann
Message 3 of 3 in “git-mv-submodule”
  1. fREW SchmidtDec 21, 2013
  2. Jens LehmannDec 21, 2013
  3. fREW SchmidtDec 21, 2013

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.