From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.214.170 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796058805; b=NpkinZOy2ltdTAyEOwTR/UZT7tzVl/P+gf6FRvj920SZkIeCHUuxZ30q8ZZOH0n1n2W3 1gpSHcZHH4ZT2ZoasdHmsINfU3sV6KVV4rurjUzAtFT/yBpgOptTSkwsjEtOl4N3OXJHY MoLcBKFYb6UU6iPhYt9I0VFGxRUisXV9FrGejktSs8wLkDQRHbIwCwTkoNbuXMiDjfPYd bA4CAKW+7oxlexiIiVyyuILqmz7oY29ax4HukJnCfURz1hsD5Z2CwofbixXaskTHR7IB9 cVthfKVD6s8+GQiF+8z+/v+0nkyjwZr+PC9EHCL2O9UiUflUJXdGJqiN632lIOqb8lQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796058805; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=6X3OdWnlVPkl2XgwCn1iSbRIIMUIgm2AwuSzSwuILJY=; b=c4dZXVDCfybWhmm+7GprOpX+hEIgs72eP1M6Rpi4Ul/M/bkINPDZMAvyjdXKw627VpQO BJDUHyaTeWa6kfWfRz0qrQFHT0rRWi/KrQDxErmqHGssrxF88RGJf5JGnQ5iU+wJHR+E8 KvyUiSrRIXXTD9O2FEnB+9j8ojUpS4irnRnMxtGWPRk7GrZDPOhxutuon5ZTohUZFCEZ0 hSs6W6MALzB0EiYTtrg6sa/Nz7eHk5FXYxWu4DOXsF5Ofjc0Mupu7/b4WqlTO0TfEUHZH H/Y4s/Y/1OKheutWbkTN+kGfCg1/jGvlKHj2uYTYHQDVulJdKJJ3hg9jaEhdoPK2DQg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=uBr9p2EK; arc=none smtp.remote-ip=209.85.214.170 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 21F78606A32E for ; Mon, 30 Nov 2026 17:13:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 21F78606A32E Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=uBr9p2EK Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-2f0621eec70so77508635ad.2 for ; Mon, 30 Nov 2026 09:13:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796058804; x=1796663604; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=6X3OdWnlVPkl2XgwCn1iSbRIIMUIgm2AwuSzSwuILJY=; b=uBr9p2EKWPFZQCVvKZ5x30B+cmD/EbKSolriUoD8tEZNptIsHGDTw/fGopmyRhio5a JXABHJrpKHe2qE4bFdQe+YlnQ44Jx4SSZAIjw1lppy6OO2h9TKpzoMOO0ivjcJjNLDIy 0aV4Q7Mv248fbjWr076WCTNJxd76OphZxlk8m5H5z43nx7XhS1Ad6metkZ0mEKBjpuqT OsVLdngVrgmFAbtUp7nmHwwXMISXtePyDtxG0rQcxFDWbGcXi5KlOkWLevmSmZ2A/IgV +BOgENNyt6R1YrF1MKlEjGfQWkptWlpHQTcpkcMUw9Vt6IItfvQiAl5CJ2sgM5qO4cst nu5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796058804; x=1796663604; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=6X3OdWnlVPkl2XgwCn1iSbRIIMUIgm2AwuSzSwuILJY=; b=0mBK43mIzvgkjNRPf0yqHoOisZczrfBt3ucGd0KXA4zC9OV0PoywQNapULDRpgvnc3 uoZInZRxJsn1ZQGcHhnEoHA/KOUSTLsOgkTMavQB8gAZHlTLjLfkEBYIbP0DVXk6P+IA SYw9SBjYhGleLEzM18cHMX79fbIyvlQAe+294i/z7u3yebh3rj3BgtowMz9Pw6NCGLLj YMlg49hZpduf8SBilD2MEK7odL3ZyjlF9oU1Y1b417pjrAuxYBQCmJJ8sXIOJRNNIcuM icp1EZnXt8+9XUSKmOccYDFSSeD9lB9K7wzg2LXcQ8VLx7cNLwqxE9ZfYmQFYbwVlynD RNfg== X-Forwarded-Encrypted: i=1; AL+hErG1RRd+7SZOqgdsTf7tUcvBK0ZfgS8PJXZVrSov7E9wQvEJZcSRJdJBJ4VZDuMzZSTeV94=@vger.kernel.org X-Gm-Message-State: APuU4Z93Zlp47lpojiXcdZqujLxGH6co+R9lXtjbqX667C+cIqDt5bwx XiUCHIrnewSddMUSakKWno5Q6hNlq5xxx8ESatryc+LDOn/9aTK7reKs5Po4ZYSpAfw= X-Gm-Gg: AZFdTZdJgJKQxtkQPW15ML/fNJrnWgV9tqR6YC4gPbOiQpN18ysEF2Cqbz0naD7dx32 ncUiksWoOQEWwDVPuod55Aqr7+qqXV1NFvclonBjN8RmWSTggef/Jq+6OS2GZ44KJrf5Sha1Gz2 Pa93HribP0sk7XasGYog4h3/Ydx/0EMl/zpBvELGZyfNWqexQIrMIhUVbXAhb72dkyPiXRVTgRb WlT/NWDK9V4UqAKkYcTkD0ow3fkw8c7e2l/zFbv4Juxz6mVfcwx2U0CLH5ldeuSIIrPr6Mozpvb tmREt6oX6Rnxz2zKKNaU9BAqoF613zqwiW1peTIbzHRWIg38NUndeI8CbLxMlybx3UvEP/7b1cI 8TJJhQJv2lH0vvUKjzDj2fW/806hmjKAlCyC8UAYDe/mmbwCYGYxWQhjNLcFl9JJcj14VT0H1dc Z7zuJwjEUjhz7Euzppr/XwxiPPJw4YDiBn5ZDdco2K9A4B6Uvm1h5vkZqm1iZST6WpmFpP1dlsa Tyeppxm5HNMyVfXQGlz+H8D0+WtR5C59YuM3qgwlAswtnB9hZBIEtfLhsNZ6YDi4XAipNQzCYrx uO2y7Khd5vKgTa64Vmm/RcH6kP+I5X9vb9+3XtyubG7VzR5UdHu7kahEAJVxjA3grKzwbNE0CQj uGaZX6Fupd/+qzHMyrmhJYVMCqmFGAo24jju6Sku8WA0= X-Received: by 2002:a17:90b:17cd:b0:3ab:4f1:4f76 with SMTP id 98e67ed59e1d1-3b41c900b24mr34651916a91.24.1796058804399; Mon, 30 Nov 2026 09:13:24 -0800 (PST) Received: from localhost.localdomain ([103.25.231.125]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b5639e13f7sm10918875a91.12.2026.11.30.09.13.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 30 Nov 2026 09:13:23 -0800 (PST) From: Aniket Gupta To: phillip.wood@dunelm.org.uk Cc: Toon Claes , Patrick Steinhardt , Junio C Hamano , Nikita Bobko , git@vger.kernel.org Subject: Re: [PATCH v2] history: refuse to rewrite branches used by other worktrees Date: Mon, 30 Nov 2026 22:43:18 +0530 Message-ID: <20261130171318.65085-1-aniketgupta3001@gmail.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <03c0d1e1-83c5-4324-b1c9-8023edc4b09e@gmail.com> References: <20261123103911.98860-1-aniketgupta3001@gmail.com> <20261127173252.7794-1-aniketgupta3001@gmail.com> <03c0d1e1-83c5-4324-b1c9-8023edc4b09e@gmail.com> X-Mailing-List: git@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit > I'd finish the sentence here. > [...] > We don't describe the advice in the documentation of the other > options so I'd drop it. Will be done in v3. > That's true for other worktrees, but not the current worktree where > the reason is that we'll end up losing work. I'd split it up We can split it up. A worktree that has the branch checked out can be left with an index and working tree that no longer match the branch. A rebase is a different problem which is the same in every worktree, i.e. if the branch is rewritten during the rebase, "git rebase --continue" either fails, or throws the rewrite away, and "git rebase --abort" brings back the old branch. In the docs I will group the reasons by what is happening to the branch, not by which worktree it is in. > A branch that is being bisected in the current worktree cannot be > rewritten because ... (is there actually a good reason?) I rewrote the branch by hand while it was being bisected in the current worktree and in a different one. Bisect could continue and "git bisect reset" checked out the rewritten branch without problems. One thing I noticed is that the result points to a commit from the old history, which is no longer on the branch. I included this check because "git branch -f" and "git rebase --update-refs" also leave a branch alone while it is being bisected. I am in favour of keeping it. Suggestions?