Re: [PATCH] Teach rm to remove submodules when given with a trailing '/'

2012-10-30 Thread Johannes Sixt
Am 10/30/2012 22:28, schrieb Jens Lehmann: > Am 29.10.2012 08:11, schrieb Johannes Sixt: >> Am 10/29/2012 0:28, schrieb Jens Lehmann: >>> + /* Remove trailing '/' from directories to find submodules in the index >>> */ >>> + for (i = 0; i < argc; i++) { >>> + size_t pathlen = strlen(

Re: [PATCH] Teach rm to remove submodules when given with a trailing '/'

2012-10-30 Thread Jens Lehmann
Am 29.10.2012 08:11, schrieb Johannes Sixt: > Am 10/29/2012 0:28, schrieb Jens Lehmann: >> +/* Remove trailing '/' from directories to find submodules in the index >> */ >> +for (i = 0; i < argc; i++) { >> +size_t pathlen = strlen(argv[i]); >> +if (pathlen && is_dir

Re: [PATCH] Teach rm to remove submodules when given with a trailing '/'

2012-10-29 Thread Johannes Sixt
Am 10/29/2012 0:28, schrieb Jens Lehmann: > + /* Remove trailing '/' from directories to find submodules in the index > */ > + for (i = 0; i < argc; i++) { > + size_t pathlen = strlen(argv[i]); > + if (pathlen && is_directory(argv[i]) && (argv[i][pathlen - 1] > ==

[PATCH] Teach rm to remove submodules when given with a trailing '/'

2012-10-28 Thread Jens Lehmann
Doing a "git rm submod/" on a submodule results in an error: fatal: pathspec 'submod/' did not match any files This is really inconvenient as e.g. using TAB completion in a shell on a submodule automatically adds the trailing '/' when it completes the path of the submodule directory. The us