Re: Git issues with submodules
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- Nov 22, 2013, 18:11 UTC
- Message-ID
- <CALkWK0muxsRUtO6KYk5G3=RVN0nqd=8gOZn=jsNbTc4B9KCATQ@mail.gmail.com>
- In-Reply-To
- <CAErtv24P+wyZKvvuuPJJ0oxzMif7XtOwJDtKcTKQdKHZaAUbig@mail.gmail.com>
Sergey Sharybin wrote:
Show 12 quoted lines
> To reproduce the issue: > > - Run git submodule update --recursive to make sure their SHA is > changed. Then `git add /path/to/changed submodule` or just `git add .` > - Modify any file from the parent repository > - Neither of `git status`, `git diff` and `git diff-files --name-only` > will show changes to a submodule, only changes to that file which was > changed in parent repo. > - Make a git commit. It will not list changes to submodule as wll. > - `git show HEAD` will show changes to both file from and parent > repository (which is expected) and will also show changes to the > submodule hash (which is unexpected i'd say).
Thanks Sergey; I can confirm that this is a bug. For some reason, the `git add .` is adding the ignored submodule to the index. After that,
$ git diff-index @
is not showing the ignored submodule. Let me see if I can dig through this in greater detail.