Re: Bug with "git mv" and submodules, and with "git submodule add something --force"

2018-10-24 Thread Junio C Hamano
Stefan Beller writes: >> You would want to be able to remove a submodule and replace it with >> a directory, but you can probably do it in two steps, i.e. >> >> git reset --hard >> git rm --cached sha1collisiondetection >> echo Now a regular dir

Bug with "git mv" and submodules, and with "git submodule add something --force"

2018-10-22 Thread Stefan Beller
On Sun, Oct 21, 2018 at 7:52 PM Junio C Hamano wrote: > > Jonathan Nieder writes: > > > Stefan Beller wrote: > > > >> Maybe for now we can do with just an update of the documentation/bugs > >> section and say we cannot move files in and out of submodules? > > > > I think we have some existing

Re: Bug with "git mv" and submodules, and with "git submodule add something --force"

2018-10-21 Thread Junio C Hamano
Jonathan Nieder writes: > Stefan Beller wrote: > >> Maybe for now we can do with just an update of the documentation/bugs >> section and say we cannot move files in and out of submodules? > > I think we have some existing logic to prevent "git add"-ing a file > within a submodule to the

Re: Bug with "git mv" and submodules, and with "git submodule add something --force"

2018-10-19 Thread Jonathan Nieder
Stefan Beller wrote: > Maybe for now we can do with just an update of the documentation/bugs > section and say we cannot move files in and out of submodules? I think we have some existing logic to prevent "git add"-ing a file within a submodule to the superproject, for example. So "git mv"

Re: Bug with "git mv" and submodules, and with "git submodule add something --force"

2018-10-19 Thread Stefan Beller
On Fri, Oct 19, 2018 at 5:43 AM Juergen Vogl wrote: > > Hi there, > > tested on both, git 2.18 and git 2.19.1: > > moving a file with `git mv` from a project to a submodule results in an > **undefined state** of the local repository. Luckily we do have a submodule in git.git itself, so we can

Bug with "git mv" and submodules, and with "git submodule add something --force"

2018-10-19 Thread Juergen Vogl
Hi there, tested on both, git 2.18 and git 2.19.1: moving a file with `git mv` from a project to a submodule results in an **undefined state** of the local repository. It breaks up the submodule (it's still in .gitmodules, but not accessable via `git submodule`), and is not reversible on local