All of lore.kernel.org
 help / color / mirror / Atom feed
* b4 corrupts patch
@ 2021-04-08 16:02 Bjorn Helgaas
  2021-04-08 16:18 ` Konstantin Ryabitsev
  0 siblings, 1 reply; 3+ messages in thread
From: Bjorn Helgaas @ 2021-04-08 16:02 UTC (permalink / raw)
  To: tools

b4 seems to corrupt this patch when fetching and adding a Reviewed-by
tag:

  https://lore.kernel.org/r/b411af88-5049-a1c6-83ac-d104a1f429be@huawei.com

It applies fine if I save the message from Mutt or if I wget it by
hand from
https://lore.kernel.org/linux-acpi/b411af88-5049-a1c6-83ac-d104a1f429be@huawei.com/raw

$ b4 --version
0.6.2

$ b4 am -om/ https://lore.kernel.org/r/b411af88-5049-a1c6-83ac-d104a1f429be@huawei.com
Looking up https://lore.kernel.org/r/b411af88-5049-a1c6-83ac-d104a1f429be%40huawei.com
Grabbing thread from lore.kernel.org/linux-acpi
Analyzing 3 messages in the thread
---
Writing m/v2_20210325_liuzhiqiang26_acpi_hotplug_pci_fix_memory_leak_in_enable_slot.mbx
  [PATCH v2] ACPI / hotplug / PCI: fix memory leak in enable_slot()
    + Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
Total patches: 1
---
 Link: https://lore.kernel.org/r/b411af88-5049-a1c6-83ac-d104a1f429be@huawei.com
 Base: not found (applies clean to current tree)
       git am m/v2_20210325_liuzhiqiang26_acpi_hotplug_pci_fix_memory_leak_in_enable_slot.mbx

$ git am m/v2_20210325_liuzhiqiang26_acpi_hotplug_pci_fix_memory_leak_in_enable_slot.mbx
Applying: ACPI / hotplug / PCI: fix memory leak in enable_slot()
error: corrupt patch at line 17
Patch failed at 0001 ACPI / hotplug / PCI: fix memory leak in enable_slot()

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

* Re: b4 corrupts patch
  2021-04-08 16:02 b4 corrupts patch Bjorn Helgaas
@ 2021-04-08 16:18 ` Konstantin Ryabitsev
  2021-04-08 17:01   ` Bjorn Helgaas
  0 siblings, 1 reply; 3+ messages in thread
From: Konstantin Ryabitsev @ 2021-04-08 16:18 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: tools

On Thu, Apr 08, 2021 at 11:02:26AM -0500, Bjorn Helgaas wrote:
> b4 seems to corrupt this patch when fetching and adding a Reviewed-by
> tag:
> 
>   https://lore.kernel.org/r/b411af88-5049-a1c6-83ac-d104a1f429be@huawei.com

Hmm... this is because the trailers are separated from the basement using '--'
and not '---'. Git gets confused, too, as if you apply the patch, you will get
this at the bottom of your commit message.

    --
    v2: rewrite subject and commit log as suggested by Bjorn Helgaas.

b4 messes things up a bit more because we mis-recognize that line as a trailer
and move "--" above the rest of the trailers (at least "git mailinfo" breaks
it up that way).

I'm not sure if I should fix this or not, as this is not a well-formed patch
to begin with.

Suggestions?

-K

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

* Re: b4 corrupts patch
  2021-04-08 16:18 ` Konstantin Ryabitsev
@ 2021-04-08 17:01   ` Bjorn Helgaas
  0 siblings, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2021-04-08 17:01 UTC (permalink / raw)
  To: tools; +Cc: Zhiqiang Liu

[+cc Zhiqiang]

On Thu, Apr 08, 2021 at 12:18:33PM -0400, Konstantin Ryabitsev wrote:
> On Thu, Apr 08, 2021 at 11:02:26AM -0500, Bjorn Helgaas wrote:
> > b4 seems to corrupt this patch when fetching and adding a Reviewed-by
> > tag:
> > 
> >   https://lore.kernel.org/r/b411af88-5049-a1c6-83ac-d104a1f429be@huawei.com
> 
> Hmm... this is because the trailers are separated from the basement using '--'
> and not '---'. Git gets confused, too, as if you apply the patch, you will get
> this at the bottom of your commit message.
> 
>     --
>     v2: rewrite subject and commit log as suggested by Bjorn Helgaas.
> 
> b4 messes things up a bit more because we mis-recognize that line as a trailer
> and move "--" above the rest of the trailers (at least "git mailinfo" breaks
> it up that way).
> 
> I'm not sure if I should fix this or not, as this is not a well-formed patch
> to begin with.
> 
> Suggestions?

I'm OK with leaving it as-is.  I cc'd the submitter in case there's
opportunity to avoid this pothole in the future.

Bjorn

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

end of thread, other threads:[~2021-04-08 17:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-08 16:02 b4 corrupts patch Bjorn Helgaas
2021-04-08 16:18 ` Konstantin Ryabitsev
2021-04-08 17:01   ` Bjorn Helgaas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.