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

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

From
Andreas Heiduk <asheiduk@gmail.com>
Date
Mar 30, 2017, 19:49 UTC
Message-ID
<1490903375-2115-1-git-send-email-asheiduk@gmail.com>

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 | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt
index bbab35f..91ced4f 100644
--- a/Documentation/git-diff.txt
+++ b/Documentation/git-diff.txt
@@ -97,6 +97,14 @@ OPTIONS
 :git-diff: 1
 include::diff-options.txt[]
 
+-1 --base::
+-2 --ours::
+-3 --theirs::
+-0::
+	Diff against the "base" version, "our branch" or "their
+	branch" respectively. The option -0 can be given to omit diff
+	output for unmerged entries and just show "Unmerged".
+
 <path>...::
 	The <paths> parameters, when given, are used to limit
 	the diff to the named paths (you can give directory
-- 
2.7.4
Next: Junio C Hamano
Message 1 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.