From: Patrick Steinhardt <ps@pks.im>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Emin Özata via GitGitGadget" <gitgitgadget@gmail.com>,
git@vger.kernel.org, "Emin Özata" <eminozata@proton.me>
Subject: Re: [PATCH v2] stash: add 'reword' subcommand
Date: Tue, 11 Aug 2026 14:49:18 +0200 [thread overview]
Message-ID: <ansaTmLSGUjWegFG@pks.im> (raw)
In-Reply-To: <xmqq4ihjf7ds.fsf@gitster.g>
On Tue, Jul 28, 2026 at 08:42:23AM -0700, Junio C Hamano wrote:
> Junio C Hamano <gitster@pobox.com> writes:
>
> > I wonder if the reflog API needs to be extended before we can
> > implement this properly. I imagine a set of functions like (there
> > may be others)
> >
> > * refs_reflog_replace(ref_stash, idx, &reflog_data);
> > * refs_reflog_edit_in_bulk(ref_stash, num_edit, reflog_edit[]);
> >
> > will become the foundations of such a feature.
>
> On further thought, I think this fits pretty well into the general
> architecture of the refs subsystem. Both backends would need
> refs_reflog_edit_in_bulk() in their vtable, while the single-entry
> edit can just be a thin wrapper passing a single-element
> reflog_edit[] array with a 'replace' operation.
Our reflog interfaces are still quite awful, but they have recently
evolved so that we can at least batch-commit reflog entries via our
transaction interfaces. They are still severely lacking though, and I
haven't yet had the time (or motivation) to improve upon this.
> If someone is interested in implementing this, there are a few
> tricky details to be careful about:
I think instead of introducing the proposed interface, we should first
investigate whether we can make the reference transactions more powerful
to allow for all of these use cases.
Thanks!
Patrick
prev parent reply other threads:[~2026-08-11 12:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 8:31 [PATCH] stash: add 'rename' subcommand Emin Özata via GitGitGadget
2026-07-16 10:08 ` Patrick Steinhardt
2026-07-16 17:46 ` Junio C Hamano
2026-07-16 21:08 ` brian m. carlson
2026-07-17 1:11 ` Junio C Hamano
2026-07-26 9:00 ` erik88
2026-07-27 5:45 ` Junio C Hamano
2026-07-27 9:18 ` Emin
2026-07-27 10:54 ` [PATCH v2] stash: add 'reword' subcommand Emin Özata via GitGitGadget
2026-07-27 17:00 ` Junio C Hamano
2026-07-28 15:42 ` Junio C Hamano
2026-08-11 12:49 ` Patrick Steinhardt [this message]
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=ansaTmLSGUjWegFG@pks.im \
--to=ps@pks.im \
--cc=eminozata@proton.me \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.