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

Re: How can I download a git commit as a diff patch?

From
LSLennart Sorensen <lsorense@csclub.uwaterloo.ca>
Date
Sep 30, 2009, 21:07 UTC
Message-ID
<20090930210745.GC22159@csclub.uwaterloo.ca>
In-Reply-To
<200909302240.17729.jnareb@gmail.com>
On Wed, Sep 30, 2009 at 10:40:16PM +0200, Jakub Narebski wrote:
Show 5 quoted lines
> You can specify parent explicitely: "git diff <rev>^1 <rev>" for diff
> to first parent, e.g. "git diff HEAD^ HEAD".
> 
> Just so you know that this single diff is not enough to redo a merge.
> It is only partial information.

Yes certainly in some cases. Often you can pick specific patches and a few patches they depend on to try and fix something, but for bigger changes it doesn't work. I am actually surprised it has been this long before I ever saw one of these combined diff's. I must have been lucky so far.

Show 6 quoted lines
> BTW. there is also "git diff-tree -m <rev>") to show diff to *all*
> parents at once:
> 
>     -m    By default, `git-diff-tree --stdin` does not show differences for
>           merge commits. With this flag, it shows differences to that commit
>           from all of its parents. See also `-c`.
I will have to try that one out.
-- 
Len Sorensen
Previous: Jakub Narebski
Message 5 of 5 in “Re: How can I download a git commit as a diff patch?”
  1. Alejandro Riveira FernándezSep 30, 2009
  2. Jakub NarebskiSep 30, 2009
  3. Lennart SorensenSep 30, 2009
  4. Jakub NarebskiSep 30, 2009
  5. Lennart SorensenSep 30, 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.