From: "Bence Ferdinandy" <bence@ferdinandy.com>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: <git@vger.kernel.org>
Subject: Re: branch description as a note?
Date: Wed, 11 Dec 2024 22:57:22 +0100 [thread overview]
Message-ID: <D697HA5ZDN2K.1I643FREX8WKC@ferdinandy.com> (raw)
In-Reply-To: <xmqq4j3ai4it.fsf@gitster.g>
On Wed Dec 11, 2024 at 17:11, Junio C Hamano <gitster@pobox.com> wrote:
> "Bence Ferdinandy" <bence@ferdinandy.com> writes:
>
>> so I've been wondering about branch descriptions being just a local
>> configuration. The only use-case I know for them is generating cover letters
>> and request-pull, although I could imagine maybe the maintainer uses branch
>> descriptions for storing the - well - branch descriptions for the "What's
>> cooking" emails and the merge commit messages.
>
> FWIW, that is not how I maintain "What's cooking". Rather, the next
> issue os "What's cooking" is pretty much edited manually, plus a
> tool that notices when an existing topic advances in order to insert
> these "(merged to 'next' on such and such day)" lines and turn '-'
> bullets into '+', and move topics from other sections to 'graduated'
> section. Especially when writing comments on a topic, being able to
> read about other topics (which may be related) and the list of titles
> helps a lot.
>
> There may be folks who find branch descriptions a useful way to keep
> a quick reminder about the branch. I was also hoping it may be like
> so, but I seem to have failed to exploit it as a useful component in
> my workflow.
>
>> 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.
>
> If this is about draft work, I would use an empty commit at the tip
> of the branch.
No, this is about storing some meta-info about a branch, somewhat similarly how
you can store meta-info about a commit in a note.
>
>> 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?
>
> The notes tree is a hashmap that uses object names as the key. The
> point of a branch is that it can grow by accumulating new commits on
> it, or its commits rewritten with "rebase -i", and there are branches
> with more than one commit. So to what commit on the branch would you
> hang such a note on?
Not to a commit, but to a branch. I mean I know a branch is just a reference to
a specific commit, but in this case the mapping would be from the branch's
_name_ to the note object.
--
bence.ferdinandy.com
next prev parent reply other threads:[~2024-12-11 21:57 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 [this message]
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
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=D697HA5ZDN2K.1I643FREX8WKC@ferdinandy.com \
--to=bence@ferdinandy.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).