On Mon, Jun 18, 2018 at 1:23 PM Heiko Voigt <hvoigt@xxxxxxxxxx> wrote: > > Hi, > > I just discovered that when you have a slash at the end of a nested > repository, the files contained in the repository get added instead of > the gitlink. > > I found this when I was adding a submodule and wanted to commit a small > change before that. You get the slash by using tab autocompletion. > > Here is a recipe to reproduce: > > mkdir test > cd test; git init > touch a; git add a; git commit -m a > mkdir ../test.git; (cd ../test.git; git init --bare) > git remote add origin ../test.git > git push origin master > git submodule add ../test.git submodule > git reset > git add submodule/ > > Now instead of just submodule gitlink there is an entry for submodule/a > in the index. > > I just thought I put this out there. Will have a look if I find the time > to cook up a proper testcase and investigate. This sounds like the submodule specific code in pathspec.c, which has been replaced with something else in bw/pathspec-sans-the-index. If you have time, try a version without those changes (e.g. v2.13 or before) to see if it's a possible culprit. > Cheers Heiko -- Duy