From: "Bence Ferdinandy" <bence@ferdinandy.com>
To: "Justin Tobler" <jltobler@gmail.com>
Cc: <git@vger.kernel.org>
Subject: Re: branch description as a note?
Date: Wed, 11 Dec 2024 23:02:56 +0100 [thread overview]
Message-ID: <D697LJWHRVMR.36YBMM1URT59U@ferdinandy.com> (raw)
In-Reply-To: <ldbhbymjanp5xg4suatp2bgbnk3etkgxqivytpqzyqkmsiuotk@hnro3pu2zqtj>
On Wed Dec 11, 2024 at 18:34, Justin Tobler <jltobler@gmail.com> wrote:
> On 24/12/11 11:39AM, Bence Ferdinandy wrote:
>
>> Now my problem with the description being a local configuration, is that
>> I often work on patches on two different computers. I can easily share my patch
>> notes with myself, but not the branch description. If these could be pushed and
>> fetched like a note, I think that would open up some other nice possibilities
>> as well, like having a standard place for MR/PR messages for forges, sharing
>> proposed merge commit messages, maybe other things.
>
> Recently I have started using branch descriptions to store MR/PR
> messages and using a script to sync it with a forge over its web API.
> This has got me thinking along the same lines. It would be nice if these
> descriptions could be part of repository tree is some manner to more
> easily facilitate distribution.
>
>> For my personal issue of sharing branch descriptions with myself, I could
>> probably just make up a convention for myself, say using refs/notes/branches,
>> but it would be nice to have this built in, instead of the local config branch
>> description.
>>
>> From usage perspective I could imagine a new `--branch` flag for notes, which
>> would tell `git notes` to operate on notes attached to branches instead of
>> specific commits, probably stored under refs/notes/branches by default. Maybe
>> add an `--edit-branch-note` to `git branch`. And of course have the option to
>> use this note instead of the description configuration wherever it makes sense.
>>
>> What do you think?
>
> One problem I see with notes is they all live in a single notes tree and
> are associated with individual commits. Therefore, I'm not quite sure
> how a specific note could be correlated with a branch without having a
> separate notes tree for each branch. Maybe the notes mechanism could be
> extended to also support storing notes associated directly with a
> reference in its tree? That might allow for notes to follow a reference
> as it gets updated.
I haven't really looked into how this could be implemented, but somehow you'd
need to map the branch's name to the object for sure. I just thought it would
help if the user facing part would be similar to notes, maybe even the same
command just with the --branch flag to tell note that the branch name should
not be resolved to a commit first and then to the note, but rather the name
directly to a special "branch note".
next prev parent reply other threads:[~2024-12-11 22:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-11 10:39 branch description as a note? Bence Ferdinandy
2024-12-11 16:11 ` Junio C Hamano
2024-12-11 17:37 ` Konstantin Ryabitsev
2024-12-11 22:11 ` Bence Ferdinandy
2024-12-12 1:39 ` Junio C Hamano
2024-12-12 2:30 ` Konstantin Ryabitsev
2024-12-11 21:57 ` Bence Ferdinandy
2024-12-12 1:00 ` Junio C Hamano
2024-12-12 10:48 ` Bence Ferdinandy
2024-12-11 17:34 ` Justin Tobler
2024-12-11 22:02 ` Bence Ferdinandy [this message]
2024-12-12 1:52 ` Junio C Hamano
2024-12-12 10:57 ` Bence Ferdinandy
2024-12-11 20:13 ` Kristoffer Haugsbakk
2024-12-11 22:07 ` Kristoffer Haugsbakk
2024-12-12 10:48 ` Oswald Buddenhagen
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=D697LJWHRVMR.36YBMM1URT59U@ferdinandy.com \
--to=bence@ferdinandy.com \
--cc=git@vger.kernel.org \
--cc=jltobler@gmail.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;
as well as URLs for NNTP newsgroup(s).