{"thread":{"id":"59132","subject":"Git worktree bug","startedAt":"2023-01-21T14:06:34Z","lastAt":"2023-01-21T14:06:34Z","messageCount":1,"participants":["Kusal Kithul-Godage"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"470839","messageId":"CAMwnG+x=j-9BWqj8TwZEAvZrS6CcYd_o4GgnnQhbGfnxVyDNUw@mail.gmail.com","threadId":"59132","inReplyTo":null,"subject":"Git worktree bug","fromName":"Kusal Kithul-Godage","fromEmail":"kusal.kithulgodage@gmail.com","sentAt":"2023-01-21T14:06:16Z","receivedAt":"2023-01-21T14:06:34Z","isPatch":false,"sender":{"key":"kusal.kithulgodage@gmail.com","avatar":null},"body":"Bug summary\n--force-with-lease option not working with worktree based repository\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\ngit clone --bare repo.git\ncd repo.git\ngit worktree add master\ncd master\ntouch file\ngit add file\ngit commit -m \"Commit\"\ngit push\ntouch file2\ngit add file2\ngit commit --amend -m \"Commit\"\ngit push --force-with-lease\n\nWhat did you expect to happen? (Expected behavior)\n+ (forced update)\n\nWhat happened instead? (Actual behavior)\n ! [rejected] (stale info)\n\nWhat's different between what you expected and what actually happened?\nThe git push command might be sending incorrect metadata as the remote\nthinks I have stale info\n\nAnything else you want to add:\nIt'd also be nice if the 'git branch' command and related commands\nbehaved the same in worktree based repos as normal repos - ie. only\nlist local branches\n\n[System Info]\ngit version:\ngit version 2.39.0\ncpu: x86_64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nfeature: fsmonitor--daemon\nuname: Darwin 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:08:47\nPST 2022; root:xnu-8792.61.2~4/RELEASE_X86_64 x86_64\ncompiler info: clang: 14.0.0 (clang-1400.0.29.202)\nlibc info: no libc information available\n$SHELL (typically, interactive shell): /usr/local/bin/zsh\n"}]}