Re: Git issues with submodules
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- Nov 22, 2013, 11:16 UTC
- Message-ID
- <CALkWK0n7jdLKOAFoFjuRz0aTCssorAgk2y=Vce76Y5aHWbj53Q@mail.gmail.com>
- In-Reply-To
- <CAErtv26Q_YN+U+trjNac1aKLi9BvNHNNuaUkrr2RE0nB+yxWsw@mail.gmail.com>
[+CC: Jens, the goto-guy for submodules]
Sergey Sharybin wrote:
> Namely, `git ls-files -m` will show addons as modified, regardless > ignore=all configuration. In the same time `git diff-index --name-only > HEAD --` will show no changes at all.
This happens because diff-index handles submodules explicitly (see diff-lib.c), while ls-files doesn't (see builtin/ls-files.c). My opinion is that this is a bug, and git ls-files needs to be taught to handle submodules properly.
> This leads to issues with Arcanist (which is a Phabricator's tool) who > considers addons as uncommited changes and either complains on this or > just adds this to commits.
Does Arcanist use `git ls-files -m` to check?
> There're also some more issues which happens to our > developers and which i can not quite reproduce.
Do try to track down the other issues and let us know.
> Sometimes it happens so git checkout to another branch yields about > uncommited changes to addons and doesn't checkout to another branch.
I've seldom used submodules with branches, so I'll let others chime in.
Cheers.