* [PATCH] b4: Include git notes when generating patches
@ 2025-01-30 20:13 Yazen Ghannam
2025-01-30 20:30 ` Konstantin Ryabitsev
0 siblings, 1 reply; 4+ messages in thread
From: Yazen Ghannam @ 2025-01-30 20:13 UTC (permalink / raw)
To: tools; +Cc: linux-kernel, konstantin, Yazen Ghannam
By default, 'git show' will include git notes in its output. However,
this is not the case if '--format', or related flags, are given.
Include the '--notes' flag to include git notes in the generated patch.
This should have no effect on non-users of git notes.
Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
---
src/b4/__init__.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/b4/__init__.py b/src/b4/__init__.py
index 4d234e01d993..23ee39bdabf9 100644
--- a/src/b4/__init__.py
+++ b/src/b4/__init__.py
@@ -3487,6 +3487,7 @@ def git_range_to_patches(gitdir: Optional[str], start: str, end: str,
gitdir,
[
'show',
+ '--notes',
'--format=email',
'--binary',
'--patch-with-stat',
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] b4: Include git notes when generating patches
2025-01-30 20:13 [PATCH] b4: Include git notes when generating patches Yazen Ghannam
@ 2025-01-30 20:30 ` Konstantin Ryabitsev
2025-01-30 21:04 ` Yazen Ghannam
0 siblings, 1 reply; 4+ messages in thread
From: Konstantin Ryabitsev @ 2025-01-30 20:30 UTC (permalink / raw)
To: Yazen Ghannam; +Cc: tools, linux-kernel
On Thu, Jan 30, 2025 at 08:13:31PM +0000, Yazen Ghannam wrote:
> By default, 'git show' will include git notes in its output. However,
> this is not the case if '--format', or related flags, are given.
>
> Include the '--notes' flag to include git notes in the generated patch.
I'd love to do that, but git-filter-repo currently doesn't do the right thing
with notes, so anyone who starts to rely on notes will find that they are
easily lost with most common b4 operations. There's a long-standing RFE to
support notes with git-filter-repo:
https://github.com/newren/git-filter-repo/issues/22
Until that happens, I really don't want to pretend that we support notes,
because this will result in bad experiences for most who try it.
-K
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] b4: Include git notes when generating patches
2025-01-30 20:30 ` Konstantin Ryabitsev
@ 2025-01-30 21:04 ` Yazen Ghannam
2025-01-30 21:29 ` Konstantin Ryabitsev
0 siblings, 1 reply; 4+ messages in thread
From: Yazen Ghannam @ 2025-01-30 21:04 UTC (permalink / raw)
To: Konstantin Ryabitsev; +Cc: tools, linux-kernel
On Thu, Jan 30, 2025 at 03:30:59PM -0500, Konstantin Ryabitsev wrote:
> On Thu, Jan 30, 2025 at 08:13:31PM +0000, Yazen Ghannam wrote:
> > By default, 'git show' will include git notes in its output. However,
> > this is not the case if '--format', or related flags, are given.
> >
> > Include the '--notes' flag to include git notes in the generated patch.
>
> I'd love to do that, but git-filter-repo currently doesn't do the right thing
> with notes, so anyone who starts to rely on notes will find that they are
> easily lost with most common b4 operations. There's a long-standing RFE to
> support notes with git-filter-repo:
>
> https://github.com/newren/git-filter-repo/issues/22
>
> Until that happens, I really don't want to pretend that we support notes,
> because this will result in bad experiences for most who try it.
>
Right, I've encountered issues myself. I've found that the 'tip-commit'
cover letter strategy works, since git-filter-repo will only operate on
the final commit.
Could we document some tips for this topic? Or just leave it for now?
Thanks,
Yazen
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] b4: Include git notes when generating patches
2025-01-30 21:04 ` Yazen Ghannam
@ 2025-01-30 21:29 ` Konstantin Ryabitsev
0 siblings, 0 replies; 4+ messages in thread
From: Konstantin Ryabitsev @ 2025-01-30 21:29 UTC (permalink / raw)
To: Yazen Ghannam; +Cc: tools, linux-kernel
On Thu, Jan 30, 2025 at 04:04:53PM -0500, Yazen Ghannam wrote:
> > I'd love to do that, but git-filter-repo currently doesn't do the right thing
> > with notes, so anyone who starts to rely on notes will find that they are
> > easily lost with most common b4 operations. There's a long-standing RFE to
> > support notes with git-filter-repo:
> >
> > https://github.com/newren/git-filter-repo/issues/22
> >
> > Until that happens, I really don't want to pretend that we support notes,
> > because this will result in bad experiences for most who try it.
> >
>
> Right, I've encountered issues myself. I've found that the 'tip-commit'
> cover letter strategy works, since git-filter-repo will only operate on
> the final commit.
Unfortunately, tip-commit is not going to fix all instances where this is
likely to break. E.g. running 'b4 trailers -u' will also rebase your series
and lose your notes.
> Could we document some tips for this topic? Or just leave it for now?
I'd just leave it for now. Hopefully, we'll eventually get to the point where
notes are supported without any workarounds (though I've been waiting for a
few years now).
-K
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-01-30 21:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-30 20:13 [PATCH] b4: Include git notes when generating patches Yazen Ghannam
2025-01-30 20:30 ` Konstantin Ryabitsev
2025-01-30 21:04 ` Yazen Ghannam
2025-01-30 21:29 ` Konstantin Ryabitsev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox