git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* Git worktree bug
@ 2023-01-21 14:06 Kusal Kithul-Godage
  0 siblings, 0 replies; only message in thread
From: Kusal Kithul-Godage @ 2023-01-21 14:06 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-21 14:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-21 14:06 Git worktree bug Kusal Kithul-Godage

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).