[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH] fix missing -F short-option for certfile [version 2]



ok, here's a PR: https://github.com/NetworkBlockDevice/nbd/pull/151
should I remove the indentation around the conditional substrings?

On Tue, Aug 1, 2023 at 4:38 PM Wouter Verhelst <w@uter.be> wrote:
Hi Matt,

On Tue, Aug 01, 2023 at 12:16:55PM -0400, Matt Panaro wrote:
>    so when I did `git format-patch`, I omitted the bottom 2 lines from the
>    output in the email (it was a string of 3 hyphens, and the git-version,
>    IIRC): are those mandatory?

I don't think so, no.

So "git format-patch" is a good start, but if you use that (and not git
send-email), then you should make sure that your mail client doesn't
mangle the output.

In your case, we got:

- a text/plain and text/html MIME part, which results in "git am" trying
  to match the HTML version of the patch in the original source file
  (and that going horribly wrong, for obvious reasons)
- Your mail client having replaced at least one horizontal tab character
  by 8 spaces, which means the patch lines do not match anymore, even
  after I just extracted the text/plain part of your email to a file.

and possibly a few other things -- I didn't go over the patch with a
fine-toothed comb ;-)

The easiest way around this is to use "git send-email", which takes the
output of "git format-patch" and sends it to the recipient without any
mangling going on, either through /usr/bin/sendmail, or (if you haven't
configured that, which is very reasonable in today's world) through a
direct SMTP connection (with support for pretty much all types of SMTP
authentication that may be required in today's world).

Failing that, you can also add the output of "git format-patch" as an
attachment. This allows me to apply it cleanly again. But that's
actually more work than just using "git format-patch", honestly ;-)

>    I can either put a snippet on github and send the link; or I could try
>    opening up an actual PR on GitHub, if that's permissible;

These both work too, if you prefer.

>    or I can try replying again w/ the full/unadulterated
>    `format-patch` output in the body of hte email (I think I also
>    removed the subject-line from the output and put it directly in the
>    email subject-line? maybe I should've just left everything as-was;
>    too used to github's workflow)

This might go wrong again, if your mail client decides that "this tab
character is silly, let's change that" or some similar silliness. You
probably shouldn't do that.

--
     w@uter.{be,co.za}
wouter@{grep.be,fosdem.org,debian.org}

I will have a Tin-Actinium-Potassium mixture, thanks.

Reply to: