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=src, destination=dest 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

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

2013-04-11 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com 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

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

2013-04-11 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com 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

[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=src, destination=dest 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