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

Re: [PATCH] diff-* --with-raw

From
Petr Baudis <pasky@suse.cz>
Date
Apr 11, 2006, 00:23 UTC
Message-ID
<20060411002311.GW27689@pasky.or.cz>
In-Reply-To
<7v3bgl7z80.fsf@assigned-by-dhcp.cox.net>

Dear diary, on Tue, Apr 11, 2006 at 02:06:07AM CEST, I got a letter where Junio C Hamano <junkio@cox.net> said that...

Show 13 quoted lines
> Junio C Hamano <junkio@cox.net> writes:
> 
> > Pasky wanted to have an option to get both diff-raw output and
> > diff-patch output.  This implements "git-diff-* --with-raw"
> > (which obviously implies -p as well) to do so.
> >
> > Because all the necessary information is already on extended
> > header lines such as "index xxxxxx..yyyyyy" and "rename from"
> > lines, this is not strictly necessary, but if it helps
> > Porcelains...
> 
> And this alternative gives raw upfront followed by patch.  It
> was unclear which one Pasky wanted, so...

Technically, I don't really care, I can parse both. :-) But I prefer this format since then people can use it even when visually inspecting the diff output, as a kind of quick patch summary followed with the patch itself. It might be nice to separate the patch by another newline, like my patch does (but again, I can parse both).

Your patch is nicer, but the --with-raw option name is strange - git-diff-* output is by default the raw format, and with the --with-raw option you tell it to furthermore include the raw format... sounds wrong, doesn't it? ;-) I'd call it --patch-with-raw or -P.

Also, it would be nice to handle the -c case as well. Not strictly necessary for cg-log right now, but other cg-Xfollowrenames users might want to have that for merges... (Potentially, this might break renames detection but the case is really obscure.)

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time.  I think
I have forgotten this before.
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 6 in “diff-* --with-raw”
  1. diff-* --with-rawJunio C Hamano, Apr 11, 2006
  2. Junio C HamanoApr 11, 2006
  3. Petr BaudisApr 11, 2006
  4. Junio C HamanoApr 11, 2006
  5. Rename --with-raw to --patch-with-raw and document itPetr Baudis, Apr 11, 2006
  6. Separate the raw diff and patch with a newlinePetr Baudis, Apr 11, 2006

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.