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

Re: [PATCH] add -p: skip conflicted paths

From
Jeff King <peff@peff.net>
Date
Apr 4, 2012, 20:25 UTC
Message-ID
<20120404202527.GA1363@sigill.intra.peff.net>
In-Reply-To
<7vty0z8i66.fsf@alter.siamese.dyndns.org>
On Wed, Apr 04, 2012 at 11:29:21AM -0700, Junio C Hamano wrote:
Show 8 quoted lines
> >> So combining the two patches, we have
> >> something like:
> >
> > Hrm.  I kind of liked the idea of doing this with a single plumbing call
> > to diff-files (the entries that come from --raw will be mostly discarded
> > except for the ones that are marked with "U"), though.
> 
> That is, something like this on top of your patch.

Ugh, I totally misread your original message and missed the fact that we _could_ see what we wanted by adding "--raw". Sorry to be dense.

Yes, this is way better. I don't mind discarding the --raw entries that are not used; they cost nothing to generate on top of what we are already doing, so it is really just the cost of shuttling a few bytes across the pipe.

> -	for (run_cmd_pipe(qw(git diff-files --numstat --summary --), @tracked)) {
> +	for (run_cmd_pipe(qw(git diff-files --numstat --summary),
> +			  ($note_unmerged ? ("--raw") : ()),
> +			  "--", @tracked)) {

Maybe it is not worth even having $note_unmerged, and just filling in the UNMERGED field unconditionally? I know other callers don't care about the information, but it's so cheap, and it just makes the function interface that much simpler.

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 14 of 16 in “add -p: skip conflicted paths”
  1. add -p: skip conflicted pathsErik Faye-Lund, Mar 28, 2012
  2. Junio C HamanoMar 28, 2012
  3. add -p: skip conflicted pathsErik Faye-Lund, Mar 28, 2012
  4. Junio C HamanoMar 28, 2012
  5. Junio C HamanoMar 28, 2012
  6. Junio C HamanoMar 28, 2012
  7. Jeff KingMar 29, 2012
  8. Erik Faye-LundApr 2, 2012
  9. Junio C HamanoApr 2, 2012
  10. Jeff KingApr 4, 2012
  11. Tay Ray ChuanApr 4, 2012
  12. Junio C HamanoApr 4, 2012
  13. Junio C HamanoApr 4, 2012
  14. Jeff KingApr 4, 2012
  15. Junio C HamanoApr 4, 2012
  16. Jeff KingApr 5, 2012

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.