From: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
To: git@vger.kernel.org
Subject: RFC: indicating diff strategy in format-patch message headers
Date: Wed, 5 Jun 2024 14:01:38 -0400 [thread overview]
Message-ID: <20240605-hilarious-dramatic-mushroom-7fd941@lemur> (raw)
Hello, all:
When developing tooling that attempts to map commits to patches, we often
don't have more than just the git-patch-id to go by. The problem is, there is
any number of ways to generate patches from commits:
- using a different strategy (--histogram, --patience, etc)
- using a different number of context lines (-U5)
Without knowing what options were used by the original author, we cannot be
certain that we'll create a patch with the same git-patch-id, even if it's
from the exact same commit.
Would it make sense to have git-format-patch (and friends) include an
additional header hinting at the options used to generate the patch? E.g.:
X-git-diff-options: algo=myers; context=3;
It won't help for all cases where we need to make a match (e.g. when we match
from git commits to a patch query), but it will help matching the other way.
Any thoughts?
-K
next reply other threads:[~2024-06-05 18:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-05 18:01 Konstantin Ryabitsev [this message]
2024-06-05 18:22 ` RFC: indicating diff strategy in format-patch message headers Junio C Hamano
2024-06-05 18:46 ` Konstantin Ryabitsev
2024-06-05 22:26 ` Eric Wong
2024-06-07 19:53 ` Konstantin Ryabitsev
2024-06-16 23:47 ` Eric Wong
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=20240605-hilarious-dramatic-mushroom-7fd941@lemur \
--to=konstantin@linuxfoundation.org \
--cc=git@vger.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