tools.linux.kernel.org archive mirror
 help / color / mirror / Atom feed
* b4 feature request: run command before rewriting history
@ 2024-10-10 11:22 Toke Høiland-Jørgensen
  2024-10-30 10:16 ` Toke Høiland-Jørgensen
  0 siblings, 1 reply; 5+ messages in thread
From: Toke Høiland-Jørgensen @ 2024-10-10 11:22 UTC (permalink / raw)
  To: Konstantin Ryabitsev; +Cc: tools, users

Hi Konstantin

I recently started switching my workflow over to 'b4 prep' for preparing
patches, and am loving the workflow. Thanks a lot for working on this!

However, I ran into one little snag, that I'm hoping could be fixed with
a new b4 feature: I am also a big fan of 'stacked git' (stgit)[0], and
often use that instead of 'rebase -i' when preparing a series for
submission.

So naturally, I want to combine 'b4 prep' with stgit. The problem here
is that stgit maintains its own state for the branches it manages, and
gets awfully confused if the git history is rewritten underneath it.
It's still possible to use it with 'b4 prep', as long as I remember to
do 'stg commit --all' before running any of the b4 commands. And, well,
guess what I already forgot several times? :)

So, my feature request is this: add support to b4 for a hook command
that is executed before any operation that will rewrite history - and
abort the rewriting if the command fails. That way, I can make sure that
I don't forget to clear the stgit state before running b4, saving me
from the pain of dealing with a confused tool.

Do you think this would be feasible to implement?

Many thanks!

-Toke

[0] https://stacked-git.github.io/


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-02-12 15:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-10 11:22 b4 feature request: run command before rewriting history Toke Høiland-Jørgensen
2024-10-30 10:16 ` Toke Høiland-Jørgensen
2024-10-30 17:36   ` Konstantin Ryabitsev
2024-10-31 10:29     ` Toke Høiland-Jørgensen
2025-02-12 15:36       ` Toke Høiland-Jørgensen

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).