From: Matt Johnston <matt@codeconstruct.com.au>
To: "Kernel.org Tools" <tools@kernel.org>
Cc: Konstantin Ryabitsev <konstantin@linuxfoundation.org>,
Matt Johnston <matt@codeconstruct.com.au>
Subject: [PATCH b4] Create patches with --default-prefix
Date: Sat, 19 Oct 2024 11:44:47 +0800 [thread overview]
Message-ID: <20241019-pr-diff-prefix-v1-1-435e6c256e2f@codeconstruct.com.au> (raw)
This matches the behaviour of `git format-patch` to ignore diff.noprefix
config (added in git 2.41.0 [1]). Otherwise b4 generated patches will
be missing the top level a/ b/ prefix when diff.noprefix config is set.
[1] https://github.com/git/git/commit/c169af8f7ab521cc47b59f104db78847e324a3cb
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
---
src/b4/__init__.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/b4/__init__.py b/src/b4/__init__.py
index 5115a9cd9b8746f84eb104a2be69fe121724167e..7ecff36005149300d8ae716a3d4a7da813a01b51 100644
--- a/src/b4/__init__.py
+++ b/src/b4/__init__.py
@@ -3469,6 +3469,7 @@ def git_range_to_patches(gitdir: Optional[str], start: str, end: str,
'--binary',
'--patch-with-stat',
'--encoding=utf-8',
+ '--default-prefix',
commit,
],
decode=False,
---
base-commit: 2a6338e451a0c1e81f214f48c820c1e52d76b2f1
change-id: 20241019-pr-diff-prefix-bc3dff956a20
Best regards,
--
Matt Johnston <matt@codeconstruct.com.au>
next reply other threads:[~2024-10-19 3:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-19 3:44 Matt Johnston [this message]
2025-01-22 15:35 ` [PATCH b4] Create patches with --default-prefix Konstantin Ryabitsev
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=20241019-pr-diff-prefix-v1-1-435e6c256e2f@codeconstruct.com.au \
--to=matt@codeconstruct.com.au \
--cc=konstantin@linuxfoundation.org \
--cc=tools@kernel.org \
/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).