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

Re: [PATCH 1/2] format-patch: fix dashdash usage

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 27, 2009, 00:03 UTC
Message-ID
<7vhbsg25sb.fsf@alter.siamese.dyndns.org>
In-Reply-To
<94a0d4530911261523q25147f12h2e6c9e4fe4f6b12b@mail.gmail.com>
Felipe Contreras <felipe.contreras@gmail.com> writes:
> How about 'git format-patch --full-diff'? Isn't that a valid way to
> filter patches just like --author, --grep, and so on?

Our messages obviously crossed and I think we are in agreement that pathspec that only is used to pick which commit to show and not limits which parts of the chosen commits are shown might have some uses.

In any case, your patch we are discussing, with a proper commit log message (without discussing if it is a good idea to give pathspecs) would be a good first step, regardless of which direction we end up going as the next step.

As to the "next step", my current thinking, unless there are convincing arguments why there should be a way to also limit the parts of the commits are shown, is to

 (0) take your patch with an updated message (eh, that is not "next step"
     but the "first step");
 (1) make --full-diff implicit and default of format-patch (--no-full-diff
     could be supported _if_ somebody can argue successfully why limiting
     the diff is also a useful thing to do); and
 (2) document clearly that format-patch takes optional pathspecs, and in
     what situation they are useful.

I think (0) is 'maint' material, and with a good documentation update (1) and (2) could also be.

Previous: Felipe ContrerasNext: Felipe Contreras
Message 7 of 11 in “format-patch: fix dashdash”
  1. 0/2 format-patch: fix dashdashFelipe Contreras, Nov 26, 2009
  2. 1/2 format-patch: fix dashdash usageFelipe Contreras, Nov 26, 2009
  3. Junio C HamanoNov 26, 2009
  4. Felipe ContrerasNov 26, 2009
  5. Junio C HamanoNov 26, 2009
  6. Felipe ContrerasNov 26, 2009
  7. Junio C HamanoNov 27, 2009
  8. Felipe ContrerasNov 28, 2009
  9. Junio C HamanoNov 26, 2009
  10. Björn SteinbrinkNov 26, 2009
  11. 2/2 format-patch: add test for dashdashFelipe Contreras, Nov 26, 2009

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.