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

[PATCH v1] Docs: Add some missing options to git-diff.txt

From
Andreas Heiduk <asheiduk@gmail.com>
Date
Apr 10, 2017, 10:59 UTC
Message-ID
<20170410105907.12045-1-asheiduk@gmail.com>
In-Reply-To
<1490903375-2115-1-git-send-email-asheiduk@gmail.com>

Well, this wording picks up your points but I won't call it "stress it" :-) However this should do the job.

--8<------>8------ git-diff understands "--ours", "--theirs" and "--base" for files with conflicts. But so far they were not documented for the central diff command but only for diff-files.

Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>
---
 Documentation/git-diff.txt | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt
index bbab35fca..2bccf4505 100644
--- a/Documentation/git-diff.txt
+++ b/Documentation/git-diff.txt
@@ -97,6 +97,21 @@ OPTIONS
 :git-diff: 1
 include::diff-options.txt[]
 
+-1 --base::
+-2 --ours::
+-3 --theirs::
+	Compare the working tree with the "base" version (stage #1),
+	"our branch" (stage #2) or "their branch" (stage #3). The
+	index contains these stages only for unmerged entries i.e.
+	while resolving conflicts.  See linkgit:git-read-tree[1]
+	section "3-Way Merge" for more information.
+
+-0::
+	Omit diff output for unmerged entries and just show
+	"Unmerged". Can be used only when comparing the working tree
+	with the index
+
+
 <path>...::
 	The <paths> parameters, when given, are used to limit
 	the diff to the named paths (you can give directory
-- 
2.12.2
Previous: Andreas Heiduk
Message 4 of 4 in “Docs: Add some missing options to git-diff.txt”
  1. Docs: Add some missing options to git-diff.txtAndreas Heiduk, Mar 30, 2017
  2. Junio C HamanoMar 30, 2017
  3. Docs: Add some missing options to git-diff.txtAndreas Heiduk, Apr 11, 2017
  4. Docs: Add some missing options to git-diff.txtAndreas Heiduk, Apr 10, 2017

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.