Article View: linux.kernel.git
Article #1408Re: [PATCH v2 0/3] reflog: add --operations and --historical-branch
From: Harald Nordgren
Date: Sat, 24 Oct 2026 19:12
Date: Sat, 24 Oct 2026 19:12
30 lines
13299 bytes
13299 bytes
> > * --historical-branch decorates each entry with the branch HEAD was on when
> > it was recorded.
>
> I quite like this idea, but think it would be nicer implemented as a
> format specifier ("%gb" seems to be free) so that users can use it in
> their custom formats. I'd be quite happy to change the default format do
> for HEAD to include the branch name after the reflog message but I'm not
> sure others would be so keen (perhaps we could get away with guarding
> any change by isatty()/GIT_PAGER_IN_USE?).
Seems like an interesting plan to do `%gb`, instead. It radically
changes this series and drops `--operations` altogether then.
> If we're going to do this we should make sure it supports "git rebase
> <upstream> <branch>" so that the branch names are accurate. That is a
> bit involved because you have to compare the name of the branch being
> rebased (which is in the "(finish)" reflog message) to the name of the
> branch that was checked out before (which isn't in that message so you
> have to go looking for a previous rebase or checkout). It also needs to
> take account of rebases that checkout a detached HEAD which don't have
> the "(finish)" message and those that checkout an up-to-date branch or
> detached HEAD where the message is "$GIT_REFLOG_ACTION: checkout
> $revision". I've got a patch [1] that fixes this for "@{-N}" which I
> think works, but it needs some more tests.
Nice, looking forward to it.
Harald
Technical Details
Message-ID:
<CAHwyqnX5sbmL_2tJ59KoBzMiTiz5OVzJXuwV+hUxU_b3YrXo-g@mail.gmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-73175-linux-kernel-git=dewy.ruReferences:
<pull.2448.git.git.1792070038.gitgitgadget@gmail.com> <pull.2448.v2.git.git.1792348037.gitgitgadget@gmail.com> <bfc2b43a-6198-47b0-8868-d92551548f22@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-73175-linux-kernel-git=dewy.ru
From: haraldnordgren@gmail.com (Harald Nordgren)
Newsgroups: linux.kernel.git
Subject: Re: [PATCH v2 0/3] reflog: add --operations and --historical-branch
Date: Sat, 24 Oct 2026 21:12:45 +0200
Organization: Usenet Network
Message-ID: <CAHwyqnX5sbmL_2tJ59KoBzMiTiz5OVzJXuwV+hUxU_b3YrXo-g@mail.gmail.com>
References: <pull.2448.git.git.1792070038.gitgitgadget@gmail.com>
<pull.2448.v2.git.git.1792348037.gitgitgadget@gmail.com> <bfc2b43a-6198-47b0-8868-d92551548f22@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: usenet.network;
logging-data="839642"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:xgDIbwB2xvAWh9sPb2jZll+5Znk= sha256:T62uBOm+nijwIwbmBZOcK7wTzh4BfBQ1knzB1oYLXZY=
sha1:f+cU/NH28bM0nJ2TaA4o2Owvj1g= sha256:qriJmoiWu+XgBu6Z/EWfZ0bN1OnT5NFIY2e14wPzUD4=
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id F277011169F; Sat, 24 Oct 2026 22:13:47 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.048
X-Spam-Status: No, score=-3.048 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id vzpzAvXYSgRI;
Sat, 24 Oct 2026 22:13:39 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=git+bounces-73175-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
by mail.dewy.ru (Postfix) with ESMTPS id 3FDEC111583; Sat, 24 Oct 2026 22:13:30 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by tor.lore.kernel.org (Postfix) with ESMTP id 900742B704; Sat, 24 Oct 2026 19:13:27 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1792869205;
b=AbGh4cT6mXq09rn/Exf9eOvV+fR/x7NDnnPW71GHyngeO3MdUtyQMCeuOGiy+AQL9SLb
dR1a/ZBXCmGnfRUddzX2ye0Z4Rylodrcn2S1L+a9HCxRN1bKILELdmLFzhNbTzPCg8JFN
hmiTntKQvX/FlxuHyBPKfMBLEEwYF7/dgHWa1BCARGjWS/k0a5LzC7hEKmxqtXfB0idFW
JdKQqLdM0JtJN51vo6dwg/uaiuGnMwLUskp36F9uiIQieW8vGQCTgJ48rVmKhLtoEyqHp
I//79Z381P39QMx3IDB63W3ya0XwVW+t6P2hxjsSRbXgyy4H/GV+Ky7GXDTAAwRxezA==
X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1792869205;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
X-Gm-Gg:X-Received:X-Mailing-List:List-Id:List-Post:List-Help:
List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
References:In-Reply-To:From:Date:X-Gm-Features:Message-ID:Subject:To:
Cc:Content-Type;
bh=Y2OTl+8gcz/UnL8a+JiEwmCgFoEkZV/xoPGluAIfKKM=;
b=CyAMWgJUuGm37LBlCrzME7L47A5xc0KCL5iETKXY2b+pVYM/NqIanA9NnaAGMYdamuG1
B1GntdIkXS3UkLxAQkxhiQ3AbPeEO5FOkPg0qjNbn9O1fYEAv1m/aH6UFdT7Cb0B7SKvK
Ot9P9nwf/s5gstLXlXHCp6gpruTV0FTL3e9+QshEAWhI9zSAgsc9zLOIjnLm3Ty1jx5Mu
QzQIYCOox823RVS57rUxO+w+I3Hyui4F0LK6KmJOuNi2twlI/BgqYj694O7Tq5Q9fSACl
yq8pmUOCNlUdTpfKnZBGtaHm9agB9lURJPNu3klu4I9WqNDNA0+u2oBMexXb9FK+G3g==
X-ARC-Authentication-Results: i=3; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=GRItas+B;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 7CE68606A321;
Sat, 24 Oct 2026 19:13:25 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=GRItas+B
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=209.85.218.41
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1792869204;
b=IfXPcnkBf4mRzCI+1at66tLkyDcMPcl5LMkcZDFLcSbiTOE9Yr2yZ3YuCRC+a05DbSlh
pEs/A88X+hsqBlWoRAR7njCtBkRYgfijkXBI6iDS7pt7KiSfi9spD3rnAQ1iNIvTWNzRu
ezigjbwkaIsRG6+CItq/d2/0iKw/EeWBtQyWr8to389YNprTKpTthJgR4U+l9Kr76i20l
ACSWogdAWk6wfbygBlic83X7UqJFjo9jiFFX2QGwLXid+cm2ZpgJ1h6epKfuP2LMfB4K9
ZOXuEJR4LaReivDtzqUljcPTAhx6nqylsgAgq2Sme3lb30Li8gRJ+uaqM4lfO2cSTFQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1792869204;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:
MIME-Version:References:In-Reply-To:From:Date:X-Gm-Features:
Message-ID:Subject:To:Cc:Content-Type;
bh=Y2OTl+8gcz/UnL8a+JiEwmCgFoEkZV/xoPGluAIfKKM=;
b=iXDDP/7r417GbnP4oZ4xknhYgIPIfIwTxAQ/W1cbW6at8qxR9I+6DemOnmh1o3q4aOf/
3ANVMJqpS8Uh/XYQ7auo1QaHVGgfSlbxYQ6FEqxxk58/Tid9qAU97itHIKLodLzNixl3W
1QJwywxUWrE8rjjV3dcisTQMHymDlPZTRYzCMs4jLmOUEZxFQwum9QJeCBBXe0GXl3qVP
3jSnk033KtICdPiG6FmxlMiSMMHhENnmPHyLfFqcZHzpLT4Tqn2Gs954lfOyippangn7O
0mZQJRl+nKw98wFrrcSih5fF3xIYcvrk68sdGoAeuHXLYlSw8cCIzVNZyX0ECnqAJ+A==
X-ARC-Authentication-Results: i=2; 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=20251104 header.b=GRItas+B;
arc=pass header.oldest-pass=0 smtp.remote-ip=209.85.218.41
X-Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41])
(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 47023606A31A
for <git@vger.kernel.org>; Sat, 24 Oct 2026 19:13:24 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 47023606A31A
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-c468bd799ecso236326866b.1
for <git@vger.kernel.org>; Sat, 24 Oct 2026 12:13:24 -0700 (PDT)
X-ARC-Seal: i=1; a=rsa-sha256; t=1792869203; cv=none;
d=google.com; s=arc-20260327;
b=arI/zp7WdLJjKXdi1HHVWyeMhL2zBHFmadthF0rBSRTq+jDiXsUhHWWTRpVLIEwxCx
9PwdhCuzJIrAnHHjVqULSHP6A+EFrXWyj/hmav0V7WSd7A/6ATqgnHlb9USGpWyMWYoF
hiuh52tEIE3z6UNaSmCaU516F5IUc8xRhnC20SJvXMYvIQMdQLnh9Zd6ZdXeDLceiKyU
IQaHiyhLaDbbzrHChayB+qO3/5kTqztbYKZ2sI09GqCNGRAGbwgM2C6yq+6xBhzoGzai
ZY52KcHR/JOXDUlJxMZBUmwZySkwkm4xnAZF6frRkitQnL/KVyPFaikULIGnIrSlur5A
7M+g==
X-ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:dkim-signature;
bh=Y2OTl+8gcz/UnL8a+JiEwmCgFoEkZV/xoPGluAIfKKM=;
fh=OvN4jAPih90UzY9L3QbjiGkAC8G43zjHGdZgWa8w6FU=;
b=G6/33mm1uUzz297f0JQwcj7RUz69SE1K/qj5pHmxI+Mem7Ux0Rx/h31LBydUX0D30l
M3JGTHGVjiKjb9jK1OvSVYOKzYJzfwpucNiAEvw3dAm/e0DhFqzWyN18262bBm+3uYIh
KTaAi3BW2F3c9B2IAxTOtRDEkTVUknkm7Ah0TeZCzckhOWIjfgPyThKkeS3NyzGSA0d3
hxazcxImMsb69ir6908BJgglSeIDBHS+fc+RvcbDYs7bUpWCF32Vd3exe6fA9AOddmFk
Djq2pqRkMCP1MDraJGIeFl8V2v89u3YhJEhh5+1fJsvVRFlgE3Xb0dqM4a2RryWAlvON
xvcA==;
darn=vger.kernel.org
X-ARC-Authentication-Results: i=1; mx.google.com; arc=none
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20251104; t=1792869203; x=1793474003; darn=vger.kernel.org;
h=content-type:cc:to:subject:message-id:date:from:in-reply-to
:references:mime-version:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=Y2OTl+8gcz/UnL8a+JiEwmCgFoEkZV/xoPGluAIfKKM=;
b=GRItas+BuR2//EKyIAr8I84QbPmHpQOwgR8v4tselsmmUR1jTjFzUnFmP99LIhDbv/
H4k3GIhE/GoCGbAJGJfp0A5XPV8AWmHq1EKC0WLzQt7uK++p43GIqwAMZnd4vruYZ65E
nK1ou9mWxpX6nUjJJtkkTALa2MMBTZSTSufL+qCQVLPsOaGpOH9O29q9XeGnEEDSSSQo
RlpbZBnkSLSU9FoB+263clApJi5w9gf+r18Fd+IBF0h8iaNX5YTtIVAs7GyxXdg/OabH
HTiSrNDnb8rMS2sI+g9HJgGIKKOksvrHfHOE49y3QRn354D1TDDjc4H4okdv7ct8tb4i
Ibyw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1792869203; x=1793474003;
h=content-type:cc:to:subject:message-id:date:from:in-reply-to
:references:mime-version:x-gm-gg:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to:content-type;
bh=Y2OTl+8gcz/UnL8a+JiEwmCgFoEkZV/xoPGluAIfKKM=;
b=dNRRP/BV0u6EHTzqI6EUI5Xixuf2ThxrqeY2SMVcAFwWBNMwOx0wWMzpfurQSo4dnH
xq/s7BD6OL+YPr+ueE4MhhacaImiZ+Vymy7eQ8uWz5ESQ+YiSEp5XbYCjKHT/GaOtQ/7
iF5nENEMcuAzRIiOyM5ai5fZU0fb8IdNy/AeeKsqJfsE5KNciiKNJebVlkp3YVX1GuBy
GJluAkAj8M/Cynsov0H46wCgxIQX2J1YWkes1XXm4Iv+DMYFBBxqOCW6vcjBwwsszvsx
pvPrdHA51dYfZwlyaggqWcrVYL75qbD5pRmg6TEJrU1yLhARKg1KD8FapMB9t4DrwQ8o
5OHw==
X-Forwarded-Encrypted: i=1; AKwUvBysCaeLt72YnHJ2/KoF9MqOPHYw9tDGC/nhM+bphx9mdaOT93NLuwChy8zsTI8FpmMelW0=@vger.kernel.org
X-Gm-Message-State: AFq9FYKn4vnJabYw9whpkPQcsjS+AhBqBiYe4fyf1X+QL02wKMg847TP
xcy9rHQc6F9rFBL78GidyQPLgPWViOTURA5zH2yTCH3I04rgi0CoNHQ73JCTTu67xxZeFG8jWtb
ODog+Q9mE786+NX6KQLzZ+eaG6BY6bG0=
X-Gm-Gg: AYBFou206nENUk6T5Vw8OiEY5LQ8zK0DqEc3QVmmf0hj4MPpSNEhVOiul30szsRA4qI
n7yApM4Q3J7CTri1MVhO8XTF6pZ6HktOjAgcNX31yDEO/5j7BbjOKmG8qzLJu+vFjyb/GXhb+X4
q0dcgBdgLkDSrmhUCJqPsGcm9pzYm0HCo/Fou6NtXcViD5+pvGWM6J2nhV34NmJfzlyLfWzHa/O
WNfRIRABgh6GqkxdgE2r0ORMWjfBKrsrARQYFjRPGQ8RhclCFuuKNiPgS+0mts2QBJqCHVPTqsy
umCVRPOoNLPhpvmOYhFVRDQsAQUM7/wDzBJhhY6ZLvmjM+GrZpp1NMMAMtz/1iBzwkHOBQW4A24
syAPAsHvr8CvkAiPJe45OstRuui2RLWfWfi+WWQ==
X-Received: by 2002:a17:907:9490:b0:c40:4965:72bd with SMTP id
a640c23a62f3a-c46bde0a9eemr302553066b.19.1792869202667; Sat, 24 Oct 2026
12:13:22 -0700 (PDT)
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <bfc2b43a-6198-47b0-8868-d92551548f22@gmail.com>
X-Gm-Features: AclHuK_dgXvnoAMMxTf4zP0kM30a0grU6lavUNn0Vn-eUsT5yjbBNWHUWQs2F9U
X-Cc: Harald Nordgren via GitGitGadget <gitgitgadget@gmail.com>, git@vger.kernel.org,
Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>, "D. Ben Knoble" <ben.knoble@gmail.com>,
Junio C Hamano <gitster@pobox.com>