From: Kusal Kithul-Godage <kusal.kithulgodage@gmail.com>
To: git@vger.kernel.org
Subject: Git worktree bug
Date: Sun, 22 Jan 2023 01:06:16 +1100 [thread overview]
Message-ID: <CAMwnG+x=j-9BWqj8TwZEAvZrS6CcYd_o4GgnnQhbGfnxVyDNUw@mail.gmail.com> (raw)
Bug summary
--force-with-lease option not working with worktree based repository
What did you do before the bug happened? (Steps to reproduce your issue)
git clone --bare repo.git
cd repo.git
git worktree add master
cd master
touch file
git add file
git commit -m "Commit"
git push
touch file2
git add file2
git commit --amend -m "Commit"
git push --force-with-lease
What did you expect to happen? (Expected behavior)
+ (forced update)
What happened instead? (Actual behavior)
! [rejected] (stale info)
What's different between what you expected and what actually happened?
The git push command might be sending incorrect metadata as the remote
thinks I have stale info
Anything else you want to add:
It'd also be nice if the 'git branch' command and related commands
behaved the same in worktree based repos as normal repos - ie. only
list local branches
[System Info]
git version:
git version 2.39.0
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
uname: Darwin 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:08:47
PST 2022; root:xnu-8792.61.2~4/RELEASE_X86_64 x86_64
compiler info: clang: 14.0.0 (clang-1400.0.29.202)
libc info: no libc information available
$SHELL (typically, interactive shell): /usr/local/bin/zsh
reply other threads:[~2023-01-21 14:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMwnG+x=j-9BWqj8TwZEAvZrS6CcYd_o4GgnnQhbGfnxVyDNUw@mail.gmail.com' \
--to=kusal.kithulgodage@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).