-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fsmonitor: only enable it in non-bare repositories #942
fsmonitor: only enable it in non-bare repositories #942
Conversation
Maybe just add it to that branch, since it's only on v1 right now? |
I'd rather not, for three reasons:
|
/submit |
Submitted as pull.942.git.1619682362363.gitgitgadget@gmail.com To fetch this version into
To fetch this version to local tag
|
config.c
Outdated
@@ -2515,6 +2515,12 @@ int git_config_get_max_percent_split_change(void) | |||
|
|||
int repo_config_get_fsmonitor(struct repository *r) | |||
{ | |||
if (!r->worktree) { | |||
/* FSMonitor makes no sense in bare repositories */ | |||
core_fsmonitor = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be = NULL
, otherwise, sparse will complain about "Using plain integer as NULL pointer".
This branch is now known as |
This patch series was integrated into seen via git@7607dc6. |
This patch series was integrated into seen via git@5f1b369. |
On the Git mailing list, Junio C Hamano wrote (reply to this):
|
This patch series was integrated into seen via git@8826990. |
The entire point of the FSMonitor is to monitor the worktree changes in a more efficient manner than `lstat()`ing all worktree files every time we refresh the index. But if there is no worktree, FSMonitor has nothing to monitor. So let's ignore if an FSMonitor is configured (e.g. in `~/.gitconfig`) and we're running in a repository without worktree. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
3a93be5
to
95333bb
Compare
/submit |
Submitted as pull.942.v2.git.1620033105872.gitgitgadget@gmail.com To fetch this version into
To fetch this version to local tag
|
On the Git mailing list, Ævar Arnfjörð Bjarmason wrote (reply to this):
|
User |
On the Git mailing list, Jeff Hostetler wrote (reply to this):
|
User |
e6bc138
to
e7580b9
Compare
This patch series was integrated into seen via git@47c3902. |
This patch series was integrated into seen via git@2e08481. |
On the Git mailing list, Ævar Arnfjörð Bjarmason wrote (reply to this):
|
This patch series was integrated into seen via git@3a1bc05. |
This patch series was integrated into seen via git@a1ff0b6. |
This patch series was integrated into seen via git@ab0bdee. |
There was a status update in the "Stalled" section about the branch An attempt to write and ship with a watchman equivalent tailored for our use. |
This patch series was integrated into seen via git@19e3c35. |
This patch series was integrated into seen via git@5216d6f. |
This patch series was integrated into seen via git@a51023d. |
On the Git mailing list, Jeff Hostetler wrote (reply to this):
|
This patch series was integrated into seen via git@a9451c3. |
There was a status update in the "Stalled" section about the branch An attempt to write and ship with a watchman equivalent tailored for our use. |
This patch series was integrated into seen via git@24242a4. |
This patch series was integrated into seen via git@79b0482. |
This patch series was integrated into seen via git@a2867f7. |
This patch series was integrated into seen via git@2eba377. |
This patch series was integrated into seen via git@4024aca. |
This patch series was integrated into seen via git@500f2ba. |
This patch series was integrated into seen via git@e6e6b8d. |
There was a status update in the "Stalled" section about the branch An attempt to write and ship with a watchman equivalent tailored for our use. |
This patch series was integrated into seen via git@14b21e6. |
This patch series was integrated into seen via git@bf43371. |
There was a status update in the "Stalled" section about the branch An attempt to write and ship with a watchman equivalent tailored for our use. |
This patch series was integrated into seen via git@bc58b98. |
This patch series was integrated into seen via git@3fd7bc3. |
There was a status update in the "Stalled" section about the branch An attempt to write and ship with a watchman equivalent tailored for our use. |
This is no longer relevant. |
For quite a while now, I run with the built-in FSMonitor via my user config. Happily, the only issue I ran into was that FSMonitor tried to run in a bare repository the other day. But an FSMonitor makes only sense if we have a worktree. So let's disable it automatically in bare repositories.
This patch applies near the top of
jh/rfc-builtin-fsmonitor
. I would like to keep it as a separate topic because the built-in FSMonitor did not introduce this bug. This bug has been in Git's FSMonitor feature for a long, long time.Changes since v1:
NULL
instead of0
(d'oh!)cc: Ævar Arnfjörð Bjarmason avarab@gmail.com
cc: Jeff Hostetler git@jeffhostetler.com