Re: [PATCH/RFC 1/3] Teach mv to move submodules together with their work trees

2013-04-11 Thread Junio C Hamano
Ramkumar Ramachandra writes: > Why does it search for a submodule with a trailing slash in the index? > You make it sound like it's doing something unnatural; in reality, it > does this because it executes lstat() on the filesystem path > specified, and the stat mode matches S_ISDIR (because it

Re: [PATCH/RFC 1/3] Teach mv to move submodules together with their work trees

2013-04-11 Thread Junio C Hamano
Ramkumar Ramachandra writes: >> Then rename() will move the submodule work tree just >> like it moves a file. > > What is this rename() function you're talking about? I don't see it anywhere. "man 2 rename"; it is called from a generic part of builtin/mv.c to rename one path to another and can

Re: [PATCH/RFC 1/3] Teach mv to move submodules together with their work trees

2013-04-11 Thread Ramkumar Ramachandra
Jens Lehmann wrote: > Currently the attempt to use "git mv" on a submodule errors out with: > fatal: source directory is empty, source=, destination= > The reason is that mv searches for the submodule with a trailing slash in > the index, which it doesn't find (because it is stored without a trai

[PATCH/RFC 1/3] Teach mv to move submodules together with their work trees

2013-04-03 Thread Jens Lehmann
Currently the attempt to use "git mv" on a submodule errors out with: fatal: source directory is empty, source=, destination= The reason is that mv searches for the submodule with a trailing slash in the index, which it doesn't find (because it is stored without a trailing slash). As it doesn't f