..
.TH "GIT-DIFF-STAGES" 1 "" "" ""
.SH NAME
-git-diff-stages \- Compares content and mode of blobs between stages in an unmerged index file.
+git-diff-stages \- Compares content and mode of blobs between stages in an unmerged index file
.SH "SYNOPSIS"
An output line is formatted this way:
-.IP
+.nf
in\-place edit :100644 100644 bcd1234\&.\&.\&. 0123456\&.\&.\&. M file0
copy\-edit :100644 100644 abcd123\&.\&.\&. 1234567\&.\&.\&. C68 file1 file2
rename\-edit :100644 100644 abcd123\&.\&.\&. 1234567\&.\&.\&. R86 file1 file3
create :000000 100644 0000000\&.\&.\&. 1234567\&.\&.\&. A file4
delete :100644 000000 1234567\&.\&.\&. 0000000\&.\&.\&. D file5
unmerged :000000 000000 0000000\&.\&.\&. 0000000\&.\&.\&. U file6
+.fi
+
That is, from the left to the right:
Example:
-.IP
+.nf
:100644 100644 5be4a4\&.\&.\&.\&.\&.\&. 000000\&.\&.\&.\&.\&.\&. M file\&.c
+.fi
+
When \-z option is not used, TAB, LF, and backslash characters in pathnames are represented as \\t, \\n, and \\\\, respectively\&.
git\-diff\-tree and git\-diff\-files can take \fI\-c\fR or \fI\-\-cc\fR option to produce \fIcombined diff\fR, which looks like this:
-.IP
+.nf
diff \-\-combined describe\&.c
@@@ +98,7 @@@
return (a_date > b_date) ? \-1 : (a_date == b_date) ? 0 : 1;
{
+ unsigned char sha1[20];
+ struct commit *cmit;
+.fi
+
Unlike the traditional \fIunified\fR diff format, which shows two files A and B with a single column that has \- (minus -- appears in A but removed in B), + (plus -- missing in A but added to B), or (space -- unchanged) prefix, this format compares two or more files file1, file2,... with one file X, and shows how X differs from each of fileN\&. One column for each of fileN is prepended to the output line to note how X's line is different from it\&.