Article View: linux.kernel.git
Article #4127Re: Notes, refs, etc. (was: Re: [PATCH v10 1/5] fetch: add remote.<name>.refmap)
From: "D. Ben Knoble"
Date: Mon, 30 Nov 2026 14:42
Date: Mon, 30 Nov 2026 14:42
114 lines
16618 bytes
16618 bytes
Hi Kristoffer, On Fri, Nov 20, 2026 at 9:25 AM Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com> wrote: > I don’t use multiple computers right now. But I do have both private and > public Git notes. In the work repository I have this > > [remote "o"] > [...] > # NOTE “tracking” idea came from the Git mailing list > # NOTE We cannot use a negative refspec to exclude branch things here > # (what I wanted) because neg. refspecs cannot have > # the destination part > fetch = +refs/*:refs/tracking/o/refs/* > > This is from some email thread(s) about using a namespace for tracking > all remote refs instead of just branches. Now I have the state of the > remote notes in case there is a divergence. Thanks, that's a neat idea. I think where I overcomplicate by trying to simplifying is fetching the remote notes into the same local ref that I write notes to ':D > > The "usual" stuff to make my notes important, but still show amlog > > notes when browsing history. (The origin remote section is in addition > > to the normal remote section with it's url and heads->origin/ > > mapping.) > > > > [remote] > > pushDefault = benknoble > > > > Push to my remote. > > > > [remote "benknoble"] > > fetch = refs/notes/*:refs/notes/benknoble/* > > push = refs/heads/*:refs/heads/* > > push = refs/notes/benknoble/*:refs/notes/* > > push = ^refs/notes/origin/amlog > > > > In addition to the usual config added by "git remote add", fetch > > remote notes into a local hierarchy, and push them out, but ignore > > amlog, and don't forget to also be able to push heads. Without the > > heads map, "git push" will not push branches! > > > > Now, maybe I'm holding something in a way it wasn't intended and > > that's made my life harder, I dunno. > > I haven’t tried the above but it doesn’t look like you have made it > harder for yourself than you need to, considering your needs. ;) What's painful is the extra reconfiguration of the push spec, hence my interest in refmaps :) If we omit the heads map, *bare* "git push" won't push a branch (but being explicit still works). With it, bare "git push" works a bit like push.default=matching, which is *also* not what I want :/ I usually want to push the current branch (push.default=current) + my notes. In most cases, there's no harm done, but I end up having to be more explicit than usual. With a refmap for pushes, I imagine I could say "when pushing, here's how to rewrite" without having to spell out what the default push refspec is manually---I might need some additional support to say "push notes in *addition* to the push.default stuff", but it would get me closer, I think. > > When "git fetch" > > fails to fetch notes because of divergence with local, I end up saying > > > > git fetch benknoble refs/notes/commits > > git range-diff refs/notes/benknoble/commits...FETCH_HEAD > > git notes merge FETCH_HEAD > > > > or something. > > > > It's *almost* like we need remote-tracking branches for notes, ahaha… > > at that point, Scott's git-meta work becomes possibly more appealing > > to me, even if a part of me wants to "fix" notes so everyone can use > > them easily. > > I don’t know what git-meta is. https://git-meta.com/ [LLM warning] > But in any case, I haven’t seen a > forcing-use case for making Notes simpler to use. Right now they are > okay-enough for the simple needs that I have seen, which is > single-author (program or person) or automatic-merge (git-appraise(1) > uses json-lines so that cat-sort-uniq merge strategy works). > > But imagine some kind of collaborative Notes usage, like multiple people > posting commentaries on commits. In that case one would need better > tooling, for sure. But collaborative metadata on commits is a bit like > the ideas like “history of history”.[1] It’s probably not going to > happen. > > [1] https://lwn.net/Articles/914041/ I think git-meta is intended for collaboration to be possible. My case is actually the single-author case, repeated: I'm interested in multiple author's notes but keep them separate. I read both but only write one :) -- D. Ben Knoble
Technical Details
Message-ID:
<CALnO6CAqrt-1JgiUe9QJzwMFuz0U6NqE0LXWJ-=AMtQbTUpMEA@mail.gmail.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.endofthelinebbs.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-76685-linux-kernel-git=dewy.ruReferences:
<e6af5d1e-4ca1-48a5-8a84-5e0cefbdbc2b@gmail.com> <E50044F1-41F6-4FD8-9A22-A43FF36932F2@gmail.com> <xmqqmrrwywq8.fsf@gitster.g> <CALnO6CB5uqHpeJm9QUC-J7n=RBVB+0pXRuMfaSQZt7mHoZbasg@mail.gmail.com> <f0dd8e55-5165-4a28-a623-748bf6c86d76@app.fastmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.endofthelinebbs.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-76685-linux-kernel-git=dewy.ru
From: ben.knoble@gmail.com ("D. Ben Knoble")
Newsgroups: linux.kernel.git
Subject: Re: Notes, refs, etc. (was: Re: [PATCH v10 1/5] fetch: add remote.<name>.refmap)
Date: Mon, 30 Nov 2026 09:42:24 -0500
Organization: Usenet Network
Message-ID: <CALnO6CAqrt-1JgiUe9QJzwMFuz0U6NqE0LXWJ-=AMtQbTUpMEA@mail.gmail.com>
References: <e6af5d1e-4ca1-48a5-8a84-5e0cefbdbc2b@gmail.com>
<E50044F1-41F6-4FD8-9A22-A43FF36932F2@gmail.com> <xmqqmrrwywq8.fsf@gitster.g>
<CALnO6CB5uqHpeJm9QUC-J7n=RBVB+0pXRuMfaSQZt7mHoZbasg@mail.gmail.com> <f0dd8e55-5165-4a28-a623-748bf6c86d76@app.fastmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
logging-data="1447537"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:mQzag3g9qtHy5X7MA/0XwwS2/FM= sha256:C3RPHZ46Ya9AtFw5owtLLF6EqI5UUuEE2IvqQsFP6hw=
sha1:KPy/S1jGT90k7vZNyI4pFj9qJd4= sha256:G+TRCvLCdhWYXpyf4kGgtMppkAQGsdqvIjlwLJmsymM=
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 4D751125FF0; Mon, 30 Nov 2026 17:42:55 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.049
X-Spam-Status: No, score=-2.049 tagged_above=-9999 required=6.31
tests=[DCC_CHECK=1.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.249,
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 8BldvXrtsDcl;
Mon, 30 Nov 2026 17:42:52 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=git+bounces-76685-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 B1D63125FEE; Mon, 30 Nov 2026 17:42:43 +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 1B13A2611A; Mon, 30 Nov 2026 14:42:41 +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=1796049758;
b=aOC6kmfqpOjh0/QT34oeFvmiiTZmDiebNpbbHCRMxmMNquCKiGCXm99h2xQw6h3P5+DC
Zo7D/OStBxWdVgVvKHKBYH0dEsGrOOM4SLJKTFDJeZN2Rmoj6gRCNYJBJgc3pm3sld+se
//qpW0/El5AYgDVGEqN6nCpN7iTLzdKOFaUIHl1P8q9jYpN8FSdj3rCHtHFu+sNAmbRph
ODD0k7gxIDBOZnsqi5AVWsM+dKHqmOudQAKMwbm0QgYmsdw7gvKdfAXUQz9rsQzOAhDyX
KxTbBMWYdee9JwDnA9FwHJ1Xjw55JlTU5dwYzMSWkjK5dDpXeppWfepy39guX6QPwdA==
X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796049758;
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:Content-Transfer-Encoding;
bh=pjG/YOqfc9DwQrPsSm3Rtc1mNsjaTusCHyb/kBwCljk=;
b=OxvtZatSvgS0hSkLUauRz6ydmLDkLfkk3T9LjJg86y6h3g4dNxiw/Y/l2lbLevQMUkLs
p9Z3PmuswwWGYpJUYJZIeGGrxikJeVP4pZ7vTQqzfB+lksi1QP9QT33rLoQyQ38kZcq8b
SpB+0kiCDWiq6mWWbd10LD1I2jsDNs6ZJXSOhg5v6yRtaFcPDPCtzRY3RpkeS9oESyASs
Iuszd12gi+y41f/GW3TxD77Gn8gCQTmPgkRLeIKsD4ftRGoOrF2bhiigvkueXXbGwtj41
TuxFQ+FTg2l+M9cKXBJRnaZh33zPbiiYpDFpUTpwifkr/O+MstdHHgbl56uNZJmAe+w==
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=20260707 header.b=hA2cu3aE;
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 64C23606A32C;
Mon, 30 Nov 2026 14:42:38 +0000 (UTC)
X-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=hA2cu3aE
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=209.85.216.53
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1796049757;
b=vaW8t+NZZnkB2oQ3lQB7knihVquIwOSsrbSfhgFvd0CyoQl6CmAPFxh2maTokxo/in8+
h9S3F94OeIIURGifRWPCQItsc8q+pkytlJ+QnQXWlvfg6MkZ0aNcj0IXEQAOP6C65C/AO
A+UYgNT8Svu7vTcSV9VORac+aA/FGMxlSX0P6oEwEOI/CDAszVpCKcCrEe5j5XlykDHxk
t486JmyWHw16Z0pgjhRJowMJ3XQ6E7HftIm9ZDZZg96ouZln/W8NOkwprcs2DYJM1bGbQ
5+fft/WzVhKp5m0zq4+82UoH6PlRv+JTPTtudWWKbkc2FbXZ07D8kPUXc0VfITfZ/uA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796049757;
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:Content-Transfer-Encoding;
bh=pjG/YOqfc9DwQrPsSm3Rtc1mNsjaTusCHyb/kBwCljk=;
b=f8KIB6oB2TH/Rreca6pL5T94yUglu2JSq559dCRmaBWvxFF6/5dd2uJS1SCwcdRin5Go
y9O87nHeQPYyo+EvLjQVZ6yHRDwxBGiYle/9eXsrXDeyr4Ot/FRjhKsljrKZMcc7bIArp
14fKzfOeBiFRfMAiqfecBBPJVzCSzGITnIUOKdVWCZblFTPDhIIK7ADUfMxDkuswh/jrE
Y+JxMkjpRkJlVGJYr4TE5R3kdSO0eOFbOD+r5MNGxt1l45MP2uuOyMfqAfyca88ExFdQc
5qW3MGGGvJ5xTrdb/2RSGG044ZljAx+cdj+oTv1LG9yoO3314O2NQS3NibYTIQY+UOQ==
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=20260707 header.b=hA2cu3aE;
arc=pass header.oldest-pass=0 smtp.remote-ip=209.85.216.53
X-Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53])
(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 3230C606A31C
for <git@vger.kernel.org>; Mon, 30 Nov 2026 14:42:37 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3230C606A31C
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-pj1-f53.google.com with SMTP id 98e67ed59e1d1-3b09a83d12aso7451660a91.2
for <git@vger.kernel.org>; Mon, 30 Nov 2026 06:42:37 -0800 (PST)
X-ARC-Seal: i=1; a=rsa-sha256; t=1796049756; cv=none;
d=google.com; s=arc-20260327;
b=R920AqTdKVTt2xcbKzvACZUyk7d0tavg+8sCwk0r+gW6LX+tRZV2arxI8pdGFZadEZ
ZnBy96dU/Zbgt5P8D4ZRbP34K3WDPk7+JVSIh1shrPilttpIlyIZWZE0h3rlC+25sWmP
wEmRfMs594plVBiiLBmiRG8AhflAwwCBnFgkZW8pQ5zE7wm7wKXuJCdUX/Mk0MtYpKhu
RstD2K+/Q1u6ji88QZRHmrsSNEMEgIPfwAuDD3IM9J8EG/78seTsM1cmRq96cSg+brjn
8U8yVuGwfW78wRHo8kZX9OtZjvlmL/FM9bY5B4ESXCBA3/+8cXNOsdJysygjwCGue5oX
/MqQ==
X-ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:dkim-signature;
bh=pjG/YOqfc9DwQrPsSm3Rtc1mNsjaTusCHyb/kBwCljk=;
fh=0e16ZAMHDr2sdeKpkbIJiQW+y+IJGwY6DLlNOktRd1Y=;
b=ZlwVDwpKm+yfQyZGCCDOnQouU+5ZM16LDiwT68NTXWQEu0psZsFzfuAOSRlp7tlcP1
ZtfRnVbd54QYD8hNJdNthMr1QokqByzlCQKzNRdds64Y2gKtLmRoRd+YIhe6Q9x8I9eK
S8yGYmqlYIraYM74MghS6xLz3VfhDLw+Yt9PjTHRw8EmQDewNZUzKi2J6Wy8tQzs52c2
ynYpU7c8Wyh0ZJ5jTK1UqFtXB8JE8GTQcbyV9fDUJCD/uZV3fZ6NtaB3/LOISQRCHz/R
3/9Qsy3lUqyDInnMjn2t8Wy56un4IbdBN1qcCchn8LX5UqfyQ1JksnX/Qe0Naey7MwUI
eHcw==;
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=20260707; t=1796049756; x=1796654556; darn=vger.kernel.org;
h=content-transfer-encoding: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=pjG/YOqfc9DwQrPsSm3Rtc1mNsjaTusCHyb/kBwCljk=;
b=hA2cu3aEiyBqxo4rq2WTKlMrhGWkkVbbdYo7mcsQN0aQcBtzwYGrgHwbW7m1WsxLyA
M3j3axPFH2w0ZyGw8KoE12rR+2aJB9g90UabY+9IlrZewgZAMVgHjF2Ntk24OGG/7JEv
QSjmpGJIV8+JEJDtW91zbGzc6T/eWEwJmcM5Df7+eaQXyRNV209u1zteafiAgEmdMV88
AcOjiqFRKqo+tNas2uPZ+3iUNLyFb/rl/4IBRJRCIz5b9FhIgmXV4BV7AO8AL8ItR3HP
rEgLClcXXP7fzDYsj/XQEE9c/UtdI2+VBNjAnKre9+gqOJhsazvc5kEjURCA1rYXLLSs
osTA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1796049756; x=1796654556;
h=content-transfer-encoding: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=pjG/YOqfc9DwQrPsSm3Rtc1mNsjaTusCHyb/kBwCljk=;
b=p7d7Cv5tml5rAS1InnUpSel8DFMgjVxEGhfdvdf6jvwkegiqLojn5hJYAfvTD8kThJ
iC2wcZStUyGnR9NZXj2PkmbY0cvWEp4SiHPXoxrn5P4dz+8YqZbJ/39OZ5fCMRinltB5
lQKmJ/ggqKq2yvYOHsdCHEeObI2KK/HboxCh9B21uGylYYNYEb+UNmNdXDWt4OAkSNOo
wEr4Z5EZaJSGhdnKKa/y34AF+e+3HEbcZTN5LyV5gLVu1HPyu+CTmMwhX9oCQIBEaJYC
iFHEZo7MrIVnHefRlHgDHeLFQTR82yb+tIF6psnFV8KORSP0KGzXxPizu7tkxDF1lIai
zfaA==
X-Forwarded-Encrypted: i=1; AL+hErFf5a8H4nYGieR+mKE3y6WH9ss9AN5OacoaG465JVjJ7DkCfa9thV3/svc4fh2ah0htH+c=@vger.kernel.org
X-Gm-Message-State: APuU4Z9NBcG8HF0S0KmE/NFmJToI7ddaOs+6Qxa7oUZWsJ/nzXicic7Y
YwiKgPzCSyCIyExK0rCr3Po+CRCl9AdGNGFpIDp/0Mf30Lse3U4c+VgPW3gdWladcNRVMPsQSFF
RAUxXF6GBvrDf/5RrZoGk/4Pa+K+UbTk=
X-Gm-Gg: AZFdTZdL9vitDdFi82G5TlFaNqvjXjHIpy1h1aKCtl7GkhPZfdaiTjORyiKuoAphJYg
NHYGspjDOBA5ZvXxUPqS/8z6PM+1+Cj7QYChu2KTXMMbm1Z0hq7iD2xJwa0jZZczx2glzLeoNdl
Kh2FGoEaoxM69GWgF5tSbDOBJ4Yo8f8jNMh1vVH206N0RvtFMiq4j1tjs2UUUKqzPgEH+dRZLBn
22vH4U8BsL1OVnC7bU9A6s1iAFVCq7qZTfK7bGhCqtMKdkVLvuud4QeDh3wg6Pl3Kk0ePVkHLoV
t93mqA+l2+ZrbdRwJCxqWqShptOENvG8XQMTgZyVz/kdrv74/s7Ztem3smibqfHfaL1xoyP+5Uf
mBOCAOqu9Ordd4tcU9mKTjKuNBCPX/0j4Y4hUXJDyFxFshbn8z9dzB29fNi2CpBJbRCU+nQMVc7
G/Rmc20+38rqJaP9qOfvHr25IwoUmAz7aLuB5LTSqjJ08G0VUEHWFR4S8fByJc/Kulo6kWLRH7+
+VLMwG+UTDGsw==
X-Received: by 2002:a17:90b:2d8a:b0:3ac:450b:164c with SMTP id
98e67ed59e1d1-3b41c96cde4mr36674455a91.47.1796049756427; Mon, 30 Nov 2026
06:42:36 -0800 (PST)
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: <f0dd8e55-5165-4a28-a623-748bf6c86d76@app.fastmail.com>
X-Gm-Features: Aa3M54rSf__es4psC6pdqU-m2MaSm0FIPKZBXb0FLf8hUDIP_x-Dlsu9jDG5PMQ
X-Cc: Junio C Hamano <gitster@pobox.com>, Phillip Wood <phillip.wood@dunelm.org.uk>,
Thomas Bachem <gitgitgadget@gmail.com>, Git <git@vger.kernel.org>,
Harald Nordgren <haraldnordgren@gmail.com>