[PATCH] mv: allow moving nested submodules

2016-04-19 Thread Stefan Beller
When directories are moved using `git mv` all files in the directory have been just moved, but no further action was taken on them. This was done by assigning the mode = WORKING_DIRECTORY to the files inside a moved directory. submodules however need to update their link to the git directory as

Re: [PATCH 0/2] WAS: [PATCH] mv: allow moving nested submodules

2016-04-19 Thread Junio C Hamano
Stefan Beller writes: > ..., but I am unsure > if patch 1 is a good idea. Then let's postpone it for now. I too would like to hear opinion from other submodule folks, especially Jens, for what 1/2 does before committing us to the course. Can you do only the 2/2 on top of

Re: [PATCH 0/2] WAS: [PATCH] mv: allow moving nested submodules

2016-04-19 Thread Stefan Beller
On Mon, Apr 18, 2016 at 5:01 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> A single patch evolves into a series. > > Power of code inspection to see bugs that are not reported, perhaps > ;-)? > > I wonder if we can come up with test cases to cover

Re: [PATCH 0/2] WAS: [PATCH] mv: allow moving nested submodules

2016-04-18 Thread Junio C Hamano
Stefan Beller writes: > A single patch evolves into a series. Power of code inspection to see bugs that are not reported, perhaps ;-)? I wonder if we can come up with test cases to cover these potential issues that are addressed in [1/2]? Thanks. -- To unsubscribe from

[PATCH 0/2] WAS: [PATCH] mv: allow moving nested submodules

2016-04-18 Thread Stefan Beller
A single patch evolves into a series. The second patch is essentially a resend with Junios suggestion squashed[1]. That patch alone doesn't quite fix it yet, as we need to make sure the submodule code respects the ignore_errors flag as instructed by the user. Patch 1 libifies the used functions

Re: [PATCH] mv: allow moving nested submodules

2016-04-18 Thread Stefan Beller
On Mon, Apr 18, 2016 at 2:13 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >> If ignore-errors is set and rename fails, this would fall through >> and try to touch this codepath... >> >>> if (submodule_gitfile[i]) { >>>

Re: [PATCH] mv: allow moving nested submodules

2016-04-18 Thread Junio C Hamano
Junio C Hamano writes: > If ignore-errors is set and rename fails, this would fall through > and try to touch this codepath... > >> if (submodule_gitfile[i]) { >> if (submodule_gitfile[i] != >> SUBMODULE_WITH_GITDIR) >>

Re: [PATCH] mv: allow moving nested submodules

2016-04-18 Thread Junio C Hamano
Stefan Beller writes: > if (show_only || verbose) > printf(_("Renaming %s to %s\n"), src, dst); > - if (!show_only && mode != INDEX) { > - if (rename(src, dst) < 0 && !ignore_errors) > + if

[PATCH] mv: allow moving nested submodules

2016-04-18 Thread Stefan Beller
When directories are moved using `git mv` all files in the directory have been just moved, but no further action was taken on them. This was done by assigning the mode = WORKING_DIRECTORY to the files inside a moved directory. submodules however need to update their link to the git directory as

[PATCH] mv: allow moving nested submodules

2016-04-15 Thread Stefan Beller
When directories are moved using `git mv` all files in the directory have been just moved, but no further action was taken on them. This was done by assigning the mode = WORKING_DIRECTORY to the files inside a moved directory. submodules however need to update their link to the git directory as