tools.linux.kernel.org archive mirror
 help / color / mirror / Atom feed
* patatt validate does not recognize patches sent with git send-email
@ 2025-01-17 16:20 Russell Hanneken
  2025-01-17 16:32 ` Konstantin Ryabitsev
  2025-01-17 16:35 ` Bugspray Bot
  0 siblings, 2 replies; 3+ messages in thread
From: Russell Hanneken @ 2025-01-17 16:20 UTC (permalink / raw)
  To: tools

Files generated by git format-patch include a line like this:

 From ee960a46b08040dd0fc154d2d0c4e2026ff817a9 Mon Sep 17 00:00:00 2001

The format-patch documentation describes this as "A brief metadata 
header that begins with From <commit> with a fixed Mon Sep 17 00:00:00 
2001 datestamp to help programs like "file(1)" to recognize that the 
file is an output from this command."

However, git send-email seems to strip this header out when it sends a 
patch by email.

When using patatt validate to validate a patch without that metadata 
header, patatt exits silently with exit code 0. It seems not to 
recognize the patch as a patch.

If I manually add the "From " header back in, patatt validate works as 
expected.

Is this a bug in patatt, or am I doing something wrong?

Regards,

Russell Hanneken
rhanneken@pobox.com


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

* Re: patatt validate does not recognize patches sent with git send-email
  2025-01-17 16:20 patatt validate does not recognize patches sent with git send-email Russell Hanneken
@ 2025-01-17 16:32 ` Konstantin Ryabitsev
  2025-01-17 16:35 ` Bugspray Bot
  1 sibling, 0 replies; 3+ messages in thread
From: Konstantin Ryabitsev @ 2025-01-17 16:32 UTC (permalink / raw)
  To: Russell Hanneken; +Cc: tools

On Fri, Jan 17, 2025 at 11:20:14AM -0500, Russell Hanneken wrote:
> Files generated by git format-patch include a line like this:
> 
> From ee960a46b08040dd0fc154d2d0c4e2026ff817a9 Mon Sep 17 00:00:00 2001
> 
> The format-patch documentation describes this as "A brief metadata header
> that begins with From <commit> with a fixed Mon Sep 17 00:00:00 2001
> datestamp to help programs like "file(1)" to recognize that the file is an
> output from this command."
> 
> However, git send-email seems to strip this header out when it sends a patch
> by email.
> 
> When using patatt validate to validate a patch without that metadata header,
> patatt exits silently with exit code 0. It seems not to recognize the patch
> as a patch.
> 
> If I manually add the "From " header back in, patatt validate works as
> expected.
> 
> Is this a bug in patatt, or am I doing something wrong?

It's more that the "From " line is required for the file you're passing for
validation to be recognized as a proper mailbox file. If you pass the message
as stdin, patatt will treat it as a single message instead of trying to open
it as a mbox file. E.g., if I edit samples/pgp-signed.txt to remove the
topmost "From ", it works:

    $ cat samples/pgp-signed.txt | ./patatt.sh validate
      PASS | konstantin@linuxfoundation.org, -

I may add a special case that if we don't find any messages in file, that we
try top open it as a single message instead of as an mbox.

bugspray tag me

-K

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

* Re: patatt validate does not recognize patches sent with git send-email
  2025-01-17 16:20 patatt validate does not recognize patches sent with git send-email Russell Hanneken
  2025-01-17 16:32 ` Konstantin Ryabitsev
@ 2025-01-17 16:35 ` Bugspray Bot
  1 sibling, 0 replies; 3+ messages in thread
From: Bugspray Bot @ 2025-01-17 16:35 UTC (permalink / raw)
  To: rhanneken, tools, tools

Hello:

This conversation is now tracked by Kernel.org Bugzilla:
https://bugzilla.kernel.org/show_bug.cgi?id=219706

There is no need to do anything else, just keep talking.
-- 
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)


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

end of thread, other threads:[~2025-01-17 16:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-17 16:20 patatt validate does not recognize patches sent with git send-email Russell Hanneken
2025-01-17 16:32 ` Konstantin Ryabitsev
2025-01-17 16:35 ` Bugspray Bot

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