{"thread":{"id":"61444","subject":"[BUG REPORT] fsmonitor and core.untrackedCache combination causes inaccurate git status","startedAt":"2024-05-09T16:30:40Z","lastAt":"2024-06-24T18:03:00Z","messageCount":2,"participants":["Joni Lameter"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"494361","messageId":"DM6PR17MB215602138249E744ECFE4185A6E62@DM6PR17MB2156.namprd17.prod.outlook.com","threadId":"61444","inReplyTo":null,"subject":"[BUG REPORT] fsmonitor and core.untrackedCache combination causes inaccurate git status","fromName":"Joni Lameter","fromEmail":"jlameter@epic.com","sentAt":"2024-05-09T15:45:47Z","receivedAt":"2024-05-09T16:30:40Z","isPatch":false,"sender":{"key":"jlameter@epic.com","avatar":null},"body":"Subject: [BUG REPORT] fsmonitor and core.untrackedCache combination causes inaccurate git status\n\n# What did you do before the bug happened? (Steps to reproduce your issue)\n\n  ## Setup\n  git clone https://github.com/git/git.git\n  cd git\n  git config core.fsmonitor true\n  git config core.untrackedCache true\n  git config alias.fetch-bug '!git -C \"$(pwd)\" fetch'\n  wt1=$(mktemp -d)\n  git worktree add \"$wt1\" -b test\n  cd \"$wt1\"\n\n  ## Worktree steps\n  git fsmonitor--daemon stop\n  git fetch-bug\n  touch foo.txt\n  git status\n  touch bar.txt\n  git status\n\n\n# What did you expect to happen? (Expected behavior)\n\n  Expected bar.txt file to appear as an untracked file\n\n\n# What happened instead? (Actual behavior)\n\n  bar.txt did not appear as an untracked file or in the status output\n  at all\n\n\n# What's different between what you expected and what actually happened?\n\n  git status did not accurately reflect the state of the worktree\n\n\n# Anything else you want to add:\n\n  The worktree seems to remain in a bug prone state even after\n  core.untrackedCache has been disabled, adding these steps shows\n  this:\n\n      git config core.untrackedCache false\n      # repeat \"Worktree steps\" (changing file names)\n      git config --unset core.untrackedCache\n      # repeat \"Worktree steps\" (changing file names)\n\n  When a worktree is added and core.untrackedCache was not set to true\n  it does not reproduce the error:\n\n      git config --unset core.untrackedCache\n      wt2=$(mktemp -d)\n      git worktree add \"$wt2\" -b test-2\n      cd \"$wt2\"\n      # repeat \"Worktree steps\"\n\n\n[System Info]\n  git version:\n  git version 2.42.0.windows.2\n  cpu: x86_64\n  built from commit: 2f819d1670fff9a1818f63b6722e9959405378e3\n  sizeof-long: 4\n  sizeof-size_t: 8\n  shell-path: /bin/sh\n  feature: fsmonitor--daemon\n  uname: Windows 10.0 22631 \n  compiler info: gnuc: 13.2\n  libc info: no libc information available\n  $SHELL (typically, interactive shell): C:\\Program Files\\Git\\usr\\bin\\bash.exe\n  \n  \n  [Enabled Hooks]\n  post-checkout\n  post-commit\n  post-merge\n  pre-push\n"},{"id":"497582","messageId":"DM6PR17MB215638310B4E03A891C1CF8FA6D42@DM6PR17MB2156.namprd17.prod.outlook.com","threadId":"61444","inReplyTo":"DM6PR17MB215602138249E744ECFE4185A6E62@DM6PR17MB2156.namprd17.prod.outlook.com","subject":"RE: [BUG REPORT] fsmonitor and core.untrackedCache combination causes inaccurate git status","fromName":"Joni Lameter","fromEmail":"jlameter@epic.com","sentAt":"2024-06-24T17:43:45Z","receivedAt":"2024-06-24T18:03:00Z","isPatch":false,"sender":{"key":"jlameter@epic.com","avatar":null},"body":"I haven't heard back about this bug report. Is there any additional \ninfo that would be helpful here? Should I have reported this \nsomewhere else?\n"}]}