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

Re: Version of dirdiff to display diffs between git trees

From
Linus Torvalds <torvalds@osdl.org>
Date
May 6, 2005, 16:19 UTC
Message-ID
<Pine.LNX.4.58.0505060916320.2233@ppc970.osdl.org>
In-Reply-To
<17019.28326.351036.268948@cargo.ozlabs.ibm.com>
On Fri, 6 May 2005, Paul Mackerras wrote:
Show 6 quoted lines
> The main window summarizes which files have changed.  Double-clicking
> on a file name pops up a diff viewer window which displays the
> differences between the different versions of the file in a
> color-coded unidiff format.  I find it useful to copy .git/HEAD to
> .git/OLD_HEAD before doing an update on my linux-2.6 repository, and
> then after the update do

If you use git-pull-script, it does this for you (except it calls it ORIG_HEAD), and you can just do

	git-diff-tree -p ORIG_HEAD HEAD

to see the changes. In fact git-pull-script will do that for you, and output the diffstat of it.

Having the original head is also nice for when you decide that the other side has had a few too many drugs, in which case you just do

	cat .git/ORIG_HEAD > .git/HEAD
	git-read-tree -m HEAD
	git-checkout-cache -f -a
	git-update-cache --refresh
and you're back to your original head (the above is basically "unpull").
		Linus
Previous: Paul MackerrasNext: Krzysztof Halasa
Message 2 of 5 in “Version of dirdiff to display diffs between git trees”
  1. Paul MackerrasMay 6, 2005
  2. Linus TorvaldsMay 6, 2005
  3. Krzysztof HalasaMay 6, 2005
  4. Linus TorvaldsMay 6, 2005
  5. Paul MackerrasMay 7, 2005

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.