git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Dubious format-patch options

From
Jeff King <peff@peff.net>
Date
Jun 13, 2008, 06:33 UTC
Message-ID
<20080613063337.GE26768@sigill.intra.peff.net>
In-Reply-To
<7vtzfyxckm.fsf@gitster.siamese.dyndns.org>
On Thu, Jun 12, 2008 at 08:01:45PM -0700, Junio C Hamano wrote:
Show 11 quoted lines
> makes some sense.  Being able to produce an unusable patch by saying
> 
>     $ git format-patch --stat old..
> 
> at the first glance is of quite dubious value, but even that would make
> sense as a good input source for "commit log automailer".
> 
> I think I know where Jon is coming from and where he wants to go.  While I
> am somewhat sympathetic to the cause of adding some warning or safety
> valve to prevent nonsense option combinations from being given, I am not
> sure we can draw a line to classify options into black and white.

I am against a safety valve here. For example, I have the following alias:

  format-patch --pretty=format:%s%n%n%b

which obviously does not generate a valid email, but which I use for pulling "how about this?" patches directly into existing emails (otherwise, I have to delete the header cruft myself). Yes, I _could_ do this with git-log, but format-patch has slightly different command line semantics. And it most clearly expresses what I want: the patch submission format, but with the header bits pretty-printed differently.

My point being that this flexibility _is_ useful, and I am not sure it is worth removing it in favor of people who get confused about why

  git format-patch --pretty=format:%s%n%n%b origin | git send-email
doesn't work.
-Peff
Previous: Junio C Hamano
Message 5 of 5 in “Dubious format-patch options”
  1. Jon LoeligerJun 13, 2008
  2. Junio C HamanoJun 13, 2008
  3. Linus TorvaldsJun 13, 2008
  4. Junio C HamanoJun 13, 2008
  5. Jeff KingJun 13, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.