From: Aniket Gupta <aniketgupta3001@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Patrick Steinhardt <ps@pks.im>,
Toon Claes <toon@iotcl.com>,
Phillip Wood <phillip.wood123@gmail.com>,
Nikita Bobko <nikita@nbobko.com>
Subject: Re: [PATCH v2] history: refuse to rewrite branches used by other worktrees
Date: Sat, 28 Nov 2026 13:07:23 +0530 [thread overview]
Message-ID: <20261128073723.75806-1-aniketgupta3001@gmail.com> (raw)
In-Reply-To: <xmqqse0l3jbr.fsf@gitster.g>
> Spelling that out directly would make the paragraph easier to follow.
Makes sense. v3 should say --update-refs=head leaves the other branches
alone and only refuses if the branch HEAD points to is used by another
worktree.
> As tested in t/t3450-history.sh, when a branch is being rebased in the
> current worktree, this advice is also shown when the current worktree is
> rebasing or bisecting the branch with HEAD detached, not only when it is
> used by another worktree.
Will fix the wording in advice.adoc.
> What new things from log-tree.h are referenced by this patch?
> The file seems to compile without this new inclusion.
Added that by mistake. get_name_decoration() is declared in commit.h,
will drop this.
> Instead of enumerating every worktree with get_worktrees() just to pick
> out '.is_current', we could call get_current_worktree(repo) and
> free_worktree(), as wt-status.c does in wt_status_get_state(). It would
> avoid reading HEAD for all linked worktrees, no?
Thanks for pointing this out. Will use that.
next prev parent reply other threads:[~2026-11-28 7:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 10:39 [PATCH] history: refuse to rewrite branches used by other worktrees Aniket Gupta
2026-11-23 13:10 ` Phillip Wood
2026-11-23 21:54 ` Aniket Gupta
2026-11-24 10:49 ` Phillip Wood
2026-11-24 14:09 ` Aniket Gupta
2026-11-23 20:14 ` Junio C Hamano
2026-11-23 21:54 ` Aniket Gupta
2026-11-27 17:32 ` [PATCH v2] " Aniket Gupta
2026-11-28 0:12 ` Junio C Hamano
2026-11-28 7:37 ` Aniket Gupta [this message]
2026-11-30 11:31 ` Toon Claes
2026-11-30 12:15 ` Aniket Gupta
2026-11-30 14:39 ` Phillip Wood
2026-11-30 17:13 ` Aniket Gupta
2026-11-30 14:49 ` Phillip Wood
2026-11-30 17:13 ` Aniket Gupta
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261128073723.75806-1-aniketgupta3001@gmail.com \
--to=aniketgupta3001@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=nikita@nbobko.com \
--cc=phillip.wood123@gmail.com \
--cc=ps@pks.im \
--cc=toon@iotcl.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox