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

Re: [PATCH] user-manual: Talk about tracking third-party snapshots

From
JFJ. Bruce Fields <bfields@fieldses.org>
Date
Nov 19, 2007, 00:48 UTC
Message-ID
<20071119004828.GB23671@fieldses.org>
In-Reply-To
<11949569992214-git-send-email-msmith@cbnco.com>
On Tue, Nov 13, 2007 at 07:29:59AM -0500, Michael Smith wrote:
Show 11 quoted lines
> +You can view all your local changes--b, d, h, and i--with the
> +gitlink:git-diff[1] command:
> +
> +------------------------------------------
> +$ git diff origin/master...master
> +------------------------------------------
> +
> +The three-dot `\...` tells gitlink:git-diff[1] to show the changes on the
> +master branch since the last common ancestor with origin/master. (If you
> +used two dots instead of three, you'd see the entire patch to go from
> +origin/master to master, including reversing commits "f" and "g".)

I missed the "..." thing when on my first attempt at the manual. It really should be mentioned in the "Generating diffs" section; I've added the following to my

	git://linux-nfs.org/~bfields/git.git maint
--b.
>From 5b98d9bca16e19710380d2d03f704de9eb98621d Mon Sep 17 00:00:00 2001
From: J. Bruce Fields <bfields@citi.umich.edu>
Date: Sun, 18 Nov 2007 19:18:27 -0500
Subject: [PATCH] user-manual: mention "..." in "Generating diffs", etc.

We should mention the use of the "..." syntax for git-diff here. The note about the difference between diff and the combined output of git-format-patch then no longer fits so well, so remove it. Add a reference to the git-format-patch[1] manpage.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
---
 Documentation/user-manual.txt |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index e399685..c027353 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -658,16 +658,23 @@ gitlink:git-diff[1]:
 $ git diff master..test
 -------------------------------------------------
 
-Sometimes what you want instead is a set of patches:
+That will produce the diff between the tips of the two branches.  If
+you'd prefer to find the diff from their common ancestor to test, you
+can use three dots instead of two:
+
+-------------------------------------------------
+$ git diff master...test
+-------------------------------------------------
+
+Sometimes what you want instead is a set of patches; for this you can
+use gitlink:git-format-patch[1]:
 
 -------------------------------------------------
 $ git format-patch master..test
 -------------------------------------------------
 
 will generate a file with a patch for each commit reachable from test
-but not from master.  Note that if master also has commits which are
-not reachable from test, then the combined result of these patches
-will not be the same as the diff produced by the git-diff example.
+but not from master.
 
 [[viewing-old-file-versions]]
 Viewing old file versions
-- 
1.5.3.5.561.g140d
Previous: J. Bruce Fields
Message 12 of 12 in “user-manual: Talk about tracking third-party snapshots”
  1. user-manual: Talk about tracking third-party snapshotsMichael Smith, Nov 13, 2007
  2. Jakub NarebskiNov 13, 2007
  3. Sergei OrganovNov 13, 2007
  4. Jakub NarebskiNov 13, 2007
  5. Jan HudecNov 17, 2007
  6. Jakub NarebskiNov 17, 2007
  7. Jan HudecNov 17, 2007
  8. Jakub NarebskiNov 17, 2007
  9. Junio C HamanoNov 13, 2007
  10. Michael SmithNov 13, 2007
  11. J. Bruce FieldsNov 19, 2007
  12. J. Bruce FieldsNov 19, 2007

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.