# Bug: fsmonitor--daemon doesn't pick up submodule changes

3 messages from 2022-05-31 to 2022-06-06. Participants: Benedek Kozma, Johannes Schindelin.
Thread: https://gitlist.dev/t/57935

## Benedek Kozma, 2022-05-31 19:08

Subject: Bug: fsmonitor--daemon doesn't pick up submodule changes
Message-ID: <CAN8jHOhn+tNn2cR7X_fPyyLF-ADiScD2gymKY9H2ZFb+UdkJSw@mail.gmail.com>
URL: https://gitlist.dev/e/CAN8jHOhn%2BtNn2cR7X_fPyyLF-ADiScD2gymKY9H2ZFb%2BUdkJSw%40mail.gmail.com

```
Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)
git status
cd submodule
git checkout origin/HEAD
cd ..
git status

What did you expect to happen? (Expected behavior)
the second git status showing that a submodule changed

What happened instead? (Actual behavior)
second git status also shows up to date

What's different between what you expected and what actually happened?

Anything else you want to add:
I have core.fsmonitor set to true in ~/.gitconfig
If I run `git status` with git version 2.32.1 then 2.36.1 will also
correctly report the submodule as changed after the next git status
(because I don't have an fsmonitor script named true, using git 2.32.1
will reset my cache)

Please review the rest of the bug report below.
You can delete any lines you don't wish to share.


[System Info]
git version:
git version 2.36.1
cpu: arm64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
uname: Darwin 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37
PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000 arm64
compiler info: clang: 13.1.6 (clang-1316.0.21.2)
libc info: no libc information available
$SHELL (typically, interactive shell): /bin/zsh


[Enabled Hooks]
pre-commit

```

## Johannes Schindelin, 2022-06-02 13:28

Subject: Re: Bug: fsmonitor--daemon doesn't pick up submodule changes
Message-ID: <nycvar.QRO.7.76.6.2206021525430.349@tvgsbejvaqbjf.bet>
URL: https://gitlist.dev/e/nycvar.QRO.7.76.6.2206021525430.349%40tvgsbejvaqbjf.bet
In-Reply-To: <CAN8jHOhn+tNn2cR7X_fPyyLF-ADiScD2gymKY9H2ZFb+UdkJSw@mail.gmail.com>

```
Hi Benedek,

On Tue, 31 May 2022, Benedek Kozma wrote:

> What did you do before the bug happened? (Steps to reproduce your issue)
> git status
> cd submodule
> git checkout origin/HEAD
> cd ..
> git status
>
> What did you expect to happen? (Expected behavior)
> the second git status showing that a submodule changed
>
> What happened instead? (Actual behavior)
> second git status also shows up to date

I believe that this should be fixed by one of the active FSMonitor patches
that are lined up for getting merged into Git:
https://lore.kernel.org/git/d0c8fecd1a0d622b1a6cce0aa79fdcdc2771db1d.1653601644.git.gitgitgadget@gmail.com/

Do you have a setup where you could apply this patch and build Git so that
you can verify whether this fixes the bug you reported?

Thanks,
Johannes

```

## Benedek Kozma, 2022-06-06 10:46

Subject: Re: Bug: fsmonitor--daemon doesn't pick up submodule changes
Message-ID: <CAN8jHOiQZPxfPy2g5XfEOeayUqt345-Cosc3T_sT039KdgawRQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAN8jHOiQZPxfPy2g5XfEOeayUqt345-Cosc3T_sT039KdgawRQ%40mail.gmail.com
In-Reply-To: <nycvar.QRO.7.76.6.2206021525430.349@tvgsbejvaqbjf.bet>

```
I tested the patch and it fixes the bug.

Johannes Schindelin <Johannes.Schindelin@gmx.de> ezt írta (időpont:
2022. jún. 2., Cs, 15:28):
>
> Hi Benedek,
>
> On Tue, 31 May 2022, Benedek Kozma wrote:
>
> > What did you do before the bug happened? (Steps to reproduce your issue)
> > git status
> > cd submodule
> > git checkout origin/HEAD
> > cd ..
> > git status
> >
> > What did you expect to happen? (Expected behavior)
> > the second git status showing that a submodule changed
> >
> > What happened instead? (Actual behavior)
> > second git status also shows up to date
>
> I believe that this should be fixed by one of the active FSMonitor patches
> that are lined up for getting merged into Git:
> https://lore.kernel.org/git/d0c8fecd1a0d622b1a6cce0aa79fdcdc2771db1d.1653601644.git.gitgitgadget@gmail.com/
>
> Do you have a setup where you could apply this patch and build Git so that
> you can verify whether this fixes the bug you reported?
>
> Thanks,
> Johannes

```
