summaryrefslogtreecommitdiff
path: root/Documentation/git-diff-files.txt
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@osdl.org>2005-11-29 21:06:10 -0800
committerJunio C Hamano <junkio@cox.net>2005-11-30 00:14:18 -0800
commit10637b84d91cf8870d1db8609a10dc5e58722378 (patch)
tree3c9caf478abc60cb208e557ce0923505b28cb3cb /Documentation/git-diff-files.txt
parent562051809589574576971c53c23aad93f8c395d9 (diff)
downloadgit-10637b84d91cf8870d1db8609a10dc5e58722378.tar.gz
diff-files: -1/-2/-3 to diff against unmerged stage.
While resolving conflicted merge, it was not easy to compare the working tree file with unmerged index entries. This commit introduces new options -1/-2/-3 (with synonyms --base, --ours, and --theirs) to compare working tree files with specified stages. When none of these options are given, the command defaults to -2 if the index file is unmerged, otherwise it acts as before. [jc: majorly butchered from the version Linus originally posted.] Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'Documentation/git-diff-files.txt')
-rw-r--r--Documentation/git-diff-files.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/git-diff-files.txt b/Documentation/git-diff-files.txt
index 3b04bfeec6..b45d1e69da 100644
--- a/Documentation/git-diff-files.txt
+++ b/Documentation/git-diff-files.txt
@@ -21,6 +21,16 @@ OPTIONS
-------
include::diff-options.txt[]
+-1 -2 -3 or --base --ours --theirs, and -0::
+ Diff against the "base" version, "our branch" or "their
+ branch" respectively. With these options, diffs for
+ merged entries are not shown.
++
+The default is to diff against our branch (-2) if there
+is an unmerged path, and show diff for unmerged entries
+otherwise. The option -0 can be given to force diff for
+unmerged entries even when the index is unmerged.
+
-q::
Remain silent even on nonexisting files