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

Re: git-mv-submodule

From
Jens Lehmann <jens.lehmann@web.de>
Date
Dec 21, 2013, 16:08 UTC
Message-ID
<52B5BD1B.5090705@web.de>
In-Reply-To
<20131221094833.GA7917@wanderlust>
Am 21.12.2013 10:48, schrieb fREW Schmidt:
Show 13 quoted lines
> Hello all,
> 
> I was on a plane, moving around some of the many (30ish) submodules in
> my dotfiles and got really annoyed at how much work it is (move the
> dir, remove old from git, add new to git, fix .gitmodules, fix
> .git/config, fix all the parts of the submodule config) so I wrote a
> perl script to work for the most common case.
> 
> As far as I know it should work for anyone not doing Something Weird,
> ie manually fiddling with their submodules.  The main case it does not
> support that I'd like to in the future is submodules containing
> submodules, and also at some point I'd like to wrap git mv to invoke
> this script on demand automatically.

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).

Previous: fREW SchmidtNext: fREW Schmidt
Message 2 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.