From: Junio C Hamano Date: Sat, 16 Dec 2006 07:44:30 +0000 (+0000) Subject: Autogenerated man pages for v1.4.4.2-g82dca X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b481ff698f4bdef33912db4813c8404c32662965;p=git.git Autogenerated man pages for v1.4.4.2-g82dca --- diff --git a/man1/git-commit.1 b/man1/git-commit.1 index 6d4fe9019..734bc3ec8 100644 --- a/man1/git-commit.1 +++ b/man1/git-commit.1 @@ -2,7 +2,7 @@ .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. -.TH "GIT\-COMMIT" "1" "12/13/2006" "" "" +.TH "GIT\-COMMIT" "1" "12/16/2006" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) @@ -75,6 +75,9 @@ but can be used to amend a merge commit. \-i|\-\-include Before making a commit out of staged contents so far, stage the contents of paths given on the command line as well. This is usually not what you want unless you are concluding a conflicted merge. .TP +\-q|\-\-quiet +Supress commit summary message. +.TP \-\- Do not interpret any more arguments as options. .TP diff --git a/man1/git-diff-files.1 b/man1/git-diff-files.1 index b6371b99d..649c20424 100644 --- a/man1/git-diff-files.1 +++ b/man1/git-diff-files.1 @@ -2,7 +2,7 @@ .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. -.TH "GIT\-DIFF\-FILES" "1" "12/06/2006" "" "" +.TH "GIT\-DIFF\-FILES" "1" "12/16/2006" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) @@ -11,10 +11,8 @@ git\-diff\-files \- Compares files in the working tree and the index .SH "SYNOPSIS" \fIgit\-diff\-files\fR [\-q] [\-0|\-1|\-2|\-3|\-c|\-\-cc] [] [\&...] -.sp .SH "DESCRIPTION" Compares the files in the working tree and the index. When paths are specified, compares only those named paths. Otherwise all entries in the index are compared. The output format is the same as "git\-diff\-index" and "git\-diff\-tree". -.sp .SH "OPTIONS" .TP \-p @@ -35,6 +33,9 @@ Generate a diffstat. You can override the default output width for 80\-column te \-\-numstat Similar to \-\-stat, but shows number of added and deleted lines in decimal notation and pathname without abbreviation, to make it more machine friendly. .TP +\-\-shortstat +Output only the last line of the \-\-stat format containing total number of modified files, as well as number of added and deleted lines. +.TP \-\-summary Output a condensed summary of extended header information such as creations, renames and mode changes. .TP @@ -81,9 +82,7 @@ Detect renames. Detect copies as well as renames. .TP \-\-diff\-filter=[ACDMRTUXB*] -Select only files that are Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R), have their type (mode) changed (T), are Unmerged (U), are Unknown (X), or have had their pairing Broken (B). Any combination of the filter characters may be used. When -* -(All\-or\-none) is added to the combination, all paths are selected if there is any file that matches other criteria in the comparison; if there is no file that matches other criteria, nothing is selected. +Select only files that are Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R), have their type (mode) changed (T), are Unmerged (U), are Unknown (X), or have had their pairing Broken (B). Any combination of the filter characters may be used. When * (All\-or\-none) is added to the combination, all paths are selected if there is any file that matches other criteria in the comparison; if there is no file that matches other criteria, nothing is selected. .TP \-\-find\-copies\-harder For performance reasons, by default, \-C option finds copies only if the original file of the copy was modified in the same changeset. This flag makes the command inspect unmodified files as candidates for the source of copy. This is a very expensive operation for large projects, so use it with caution. @@ -123,26 +122,23 @@ Ignore white space when comparing lines. This ignores difference even if one lin .TP \-w Shorthand for "\-\-ignore\-all\-space". + For more detailed explanation on these common options, see also [1]\&\fIdiffcore documentation\fR. -.sp .TP \-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. -.sp + The default is to diff against our branch (\-2) and the cleanly resolved paths. The option \-0 can be given to omit diff output for unmerged entries and just show "Unmerged". .TP \-c,\-\-cc -This compares stage 2 (our branch), stage 3 (their branch) and the working tree file and outputs a combined diff, similar to the way -\fIdiff\-tree\fR -shows a merge commit with these flags. +This compares stage 2 (our branch), stage 3 (their branch) and the working tree file and outputs a combined diff, similar to the way \fIdiff\-tree\fR shows a merge commit with these flags. .TP \-q Remain silent even on nonexistent files .SH "OUTPUT FORMAT" The output format from "git\-diff\-index", "git\-diff\-tree" and "git\-diff\-files" are very similar. -.sp + These commands all compare two sets of things; what is compared differs: -.sp .TP git\-diff\-index compares the and the files on the filesystem. @@ -155,9 +151,9 @@ compares the trees named by the two arguments. .TP git\-diff\-files [\&...] compares the index and the files on the filesystem. + An output line is formatted this way: .sp -.sp .nf in\-place edit :100644 100644 bcd1234... 0123456... M file0 copy\-edit :100644 100644 abcd123... 1234567... C68 file1 file2 @@ -167,7 +163,6 @@ delete :100644 000000 1234567... 0000000... D file5 unmerged :000000 000000 0000000... 0000000... U file6 .fi That is, from the left to the right: -.sp .TP 3 1. a colon. @@ -200,40 +195,32 @@ a space. status, followed by optional "score" number. .TP 11. -a tab or a NUL when -\fI\-z\fR -option is used. +a tab or a NUL when \fI\-z\fR option is used. .TP 12. path for "src" .TP 13. -a tab or a NUL when -\fI\-z\fR -option is used; only exists for C or R. +a tab or a NUL when \fI\-z\fR option is used; only exists for C or R. .TP 14. path for "dst"; only exists for C or R. .TP 15. -an LF or a NUL when -\fI\-z\fR -option is used, to terminate the record. +an LF or a NUL when \fI\-z\fR option is used, to terminate the record. + is shown as all 0's if a file is new on the filesystem and it is out of sync with the index. -.sp + Example: .sp -.sp .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. -.sp .SH "GENERATING PATCHES WITH \-P" When "git\-diff\-index", "git\-diff\-tree", or "git\-diff\-files" are run with a \fI\-p\fR option, they do not produce the output described above; instead they produce a patch file. You can customize the creation of such patches via the GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS environment variables. -.sp + What the \-p option produces is slightly different from the traditional diff format. -.sp .TP 3 1. It is preceded with a "git diff" header, that looks like this: @@ -241,23 +228,9 @@ It is preceded with a "git diff" header, that looks like this: .nf diff \-\-git a/file1 b/file2 .fi -The -a/ -and -b/ -filenames are the same unless rename/copy is involved. Especially, even for a creation or a deletion, -/dev/null -is _not_ used in place of -a/ -or -b/ -filenames. -.sp -When rename/copy is involved, -file1 -and -file2 -show the name of the source file of the rename/copy and the name of the file that rename/copy produces, respectively. +The a/ and b/ filenames are the same unless rename/copy is involved. Especially, even for a creation or a deletion, /dev/null is _not_ used in place of a/ or b/ filenames. + +When rename/copy is involved, file1 and file2 show the name of the source file of the rename/copy and the name of the file that rename/copy produces, respectively. .TP 2. It is followed by one or more extended header lines: @@ -277,16 +250,10 @@ index .. .fi .TP 3. -TAB, LF, double quote and backslash characters in pathnames are represented as -\\t, -\\n, -\\" -and -\\\\, respectively. If there is need for such substitution then the whole pathname is put in double quotes. +TAB, LF, double quote and backslash characters in pathnames are represented as \\t, \\n, \\" and \\\\, respectively. If there is need for such substitution then the whole pathname is put in double quotes. .SH "COMBINED DIFF FORMAT" 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: .sp -.sp .nf diff \-\-combined describe.c index fabadb8,cc95eb0..4866510 @@ -318,16 +285,12 @@ index fabadb8,cc95eb0..4866510 .fi .TP 3 1. -It is preceded with a "git diff" header, that looks like this (when -\fI\-c\fR -option is used): +It is preceded with a "git diff" header, that looks like this (when \fI\-c\fR option is used): .sp .nf diff \-\-combined file .fi -or like this (when -\fI\-\-cc\fR -option is used): +or like this (when \fI\-\-cc\fR option is used): .sp .nf diff \-\-c file @@ -342,9 +305,7 @@ mode ,.. new file mode deleted file mode , .fi -The -mode ,.. -line appears only if at least one of the is diferent from the rest. Extended headers with information about detected contents movement (renames and copying detection) are designed to work with diff of two and are not used by combined diff format. +The mode ,.. line appears only if at least one of the is diferent from the rest. Extended headers with information about detected contents movement (renames and copying detection) are designed to work with diff of two and are not used by combined diff format. .TP 3. It is followed by two\-line from\-file/to\-file header @@ -353,41 +314,29 @@ It is followed by two\-line from\-file/to\-file header \-\-\- a/file +++ b/file .fi -Similar to two\-line header for traditional -\fIunified\fR -diff format, -/dev/null -is used to signal created or deleted files. +Similar to two\-line header for traditional \fIunified\fR diff format, /dev/null is used to signal created or deleted files. .TP 4. -Chunk header format is modified to prevent people from accidentally feeding it to -patch \-p1. Combined diff format was created for review of merge commit changes, and was not meant for apply. The change is similar to the change in the extended -\fIindex\fR -header: +Chunk header format is modified to prevent people from accidentally feeding it to patch \-p1. Combined diff format was created for review of merge commit changes, and was not meant for apply. The change is similar to the change in the extended \fIindex\fR header: .sp .nf @@@ @@@ .fi -There are (number of parents + 1) -@ -characters in the chunk header for combined diff format. +There are (number of parents + 1) @ characters in the chunk header for combined diff format. + Unlike the traditional \fIunified\fR diff format, which shows two files A and B with a single column that has \- (minus \(em appears in A but removed in B), + (plus \(em missing in A but added to B), or " " (space \(em 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. -.sp + A \- character in the column N means that the line appears in fileN but it does not appear in the result. A + character in the column N means that the line appears in the last file, and fileN does not have that line (in other words, the line was added, from the point of view of that parent). -.sp + In the above example output, the function signature was changed from both files (hence two \- removals from both file1 and file2, plus ++ to mean one line that was added does not appear in either file1 nor file2). Also two other lines are the same from file1 but do not appear in file2 (hence prefixed with +). -.sp + When shown by git diff\-tree \-c, it compares the parents of a merge commit with the merge result (i.e. file1..fileN are the parents). When shown by git diff\-files \-c, it compares the two unresolved merge parents with the working tree file (i.e. file1 is stage 2 aka "our version", file2 is stage 3 aka "their version"). -.sp .SH "AUTHOR" Written by Linus Torvalds -.sp .SH "DOCUMENTATION" Documentation by David Greaves, Junio C Hamano and the git\-list . -.sp .SH "GIT" Part of the \fBgit\fR(7) suite -.sp .SH "REFERENCES" .TP 3 1.\ diffcore documentation diff --git a/man1/git-diff-index.1 b/man1/git-diff-index.1 index 5cc2fa164..d3fba075a 100644 --- a/man1/git-diff-index.1 +++ b/man1/git-diff-index.1 @@ -2,7 +2,7 @@ .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. -.TH "GIT\-DIFF\-INDEX" "1" "12/06/2006" "" "" +.TH "GIT\-DIFF\-INDEX" "1" "12/16/2006" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) @@ -11,10 +11,8 @@ git\-diff\-index \- Compares content and mode of blobs between the index and repository .SH "SYNOPSIS" \fIgit\-diff\-index\fR [\-m] [\-\-cached] [] [\&...] -.sp .SH "DESCRIPTION" Compares the content and mode of the blobs found via a tree object with the content of the current index and, optionally ignoring the stat state of the file on disk. When paths are specified, compares only those named paths. Otherwise all entries in the index are compared. -.sp .SH "OPTIONS" .TP \-p @@ -35,6 +33,9 @@ Generate a diffstat. You can override the default output width for 80\-column te \-\-numstat Similar to \-\-stat, but shows number of added and deleted lines in decimal notation and pathname without abbreviation, to make it more machine friendly. .TP +\-\-shortstat +Output only the last line of the \-\-stat format containing total number of modified files, as well as number of added and deleted lines. +.TP \-\-summary Output a condensed summary of extended header information such as creations, renames and mode changes. .TP @@ -81,9 +82,7 @@ Detect renames. Detect copies as well as renames. .TP \-\-diff\-filter=[ACDMRTUXB*] -Select only files that are Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R), have their type (mode) changed (T), are Unmerged (U), are Unknown (X), or have had their pairing Broken (B). Any combination of the filter characters may be used. When -* -(All\-or\-none) is added to the combination, all paths are selected if there is any file that matches other criteria in the comparison; if there is no file that matches other criteria, nothing is selected. +Select only files that are Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R), have their type (mode) changed (T), are Unmerged (U), are Unknown (X), or have had their pairing Broken (B). Any combination of the filter characters may be used. When * (All\-or\-none) is added to the combination, all paths are selected if there is any file that matches other criteria in the comparison; if there is no file that matches other criteria, nothing is selected. .TP \-\-find\-copies\-harder For performance reasons, by default, \-C option finds copies only if the original file of the copy was modified in the same changeset. This flag makes the command inspect unmodified files as candidates for the source of copy. This is a very expensive operation for large projects, so use it with caution. @@ -123,8 +122,8 @@ Ignore white space when comparing lines. This ignores difference even if one lin .TP \-w Shorthand for "\-\-ignore\-all\-space". + For more detailed explanation on these common options, see also [1]\&\fIdiffcore documentation\fR. -.sp .TP The id of a tree object to diff against. @@ -136,9 +135,8 @@ do not consider the on\-disk file at all By default, files recorded in the index but not checked out are reported as deleted. This flag makes "git\-diff\-index" say that all non\-checked\-out files are up to date. .SH "OUTPUT FORMAT" The output format from "git\-diff\-index", "git\-diff\-tree" and "git\-diff\-files" are very similar. -.sp + These commands all compare two sets of things; what is compared differs: -.sp .TP git\-diff\-index compares the and the files on the filesystem. @@ -151,9 +149,9 @@ compares the trees named by the two arguments. .TP git\-diff\-files [\&...] compares the index and the files on the filesystem. + An output line is formatted this way: .sp -.sp .nf in\-place edit :100644 100644 bcd1234... 0123456... M file0 copy\-edit :100644 100644 abcd123... 1234567... C68 file1 file2 @@ -163,7 +161,6 @@ delete :100644 000000 1234567... 0000000... D file5 unmerged :000000 000000 0000000... 0000000... U file6 .fi That is, from the left to the right: -.sp .TP 3 1. a colon. @@ -196,40 +193,32 @@ a space. status, followed by optional "score" number. .TP 11. -a tab or a NUL when -\fI\-z\fR -option is used. +a tab or a NUL when \fI\-z\fR option is used. .TP 12. path for "src" .TP 13. -a tab or a NUL when -\fI\-z\fR -option is used; only exists for C or R. +a tab or a NUL when \fI\-z\fR option is used; only exists for C or R. .TP 14. path for "dst"; only exists for C or R. .TP 15. -an LF or a NUL when -\fI\-z\fR -option is used, to terminate the record. +an LF or a NUL when \fI\-z\fR option is used, to terminate the record. + is shown as all 0's if a file is new on the filesystem and it is out of sync with the index. -.sp + Example: .sp -.sp .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. -.sp .SH "GENERATING PATCHES WITH \-P" When "git\-diff\-index", "git\-diff\-tree", or "git\-diff\-files" are run with a \fI\-p\fR option, they do not produce the output described above; instead they produce a patch file. You can customize the creation of such patches via the GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS environment variables. -.sp + What the \-p option produces is slightly different from the traditional diff format. -.sp .TP 3 1. It is preceded with a "git diff" header, that looks like this: @@ -237,23 +226,9 @@ It is preceded with a "git diff" header, that looks like this: .nf diff \-\-git a/file1 b/file2 .fi -The -a/ -and -b/ -filenames are the same unless rename/copy is involved. Especially, even for a creation or a deletion, -/dev/null -is _not_ used in place of -a/ -or -b/ -filenames. -.sp -When rename/copy is involved, -file1 -and -file2 -show the name of the source file of the rename/copy and the name of the file that rename/copy produces, respectively. +The a/ and b/ filenames are the same unless rename/copy is involved. Especially, even for a creation or a deletion, /dev/null is _not_ used in place of a/ or b/ filenames. + +When rename/copy is involved, file1 and file2 show the name of the source file of the rename/copy and the name of the file that rename/copy produces, respectively. .TP 2. It is followed by one or more extended header lines: @@ -273,16 +248,10 @@ index .. .fi .TP 3. -TAB, LF, double quote and backslash characters in pathnames are represented as -\\t, -\\n, -\\" -and -\\\\, respectively. If there is need for such substitution then the whole pathname is put in double quotes. +TAB, LF, double quote and backslash characters in pathnames are represented as \\t, \\n, \\" and \\\\, respectively. If there is need for such substitution then the whole pathname is put in double quotes. .SH "COMBINED DIFF FORMAT" 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: .sp -.sp .nf diff \-\-combined describe.c index fabadb8,cc95eb0..4866510 @@ -314,16 +283,12 @@ index fabadb8,cc95eb0..4866510 .fi .TP 3 1. -It is preceded with a "git diff" header, that looks like this (when -\fI\-c\fR -option is used): +It is preceded with a "git diff" header, that looks like this (when \fI\-c\fR option is used): .sp .nf diff \-\-combined file .fi -or like this (when -\fI\-\-cc\fR -option is used): +or like this (when \fI\-\-cc\fR option is used): .sp .nf diff \-\-c file @@ -338,9 +303,7 @@ mode ,.. new file mode deleted file mode , .fi -The -mode ,.. -line appears only if at least one of the is diferent from the rest. Extended headers with information about detected contents movement (renames and copying detection) are designed to work with diff of two and are not used by combined diff format. +The mode ,.. line appears only if at least one of the is diferent from the rest. Extended headers with information about detected contents movement (renames and copying detection) are designed to work with diff of two and are not used by combined diff format. .TP 3. It is followed by two\-line from\-file/to\-file header @@ -349,83 +312,66 @@ It is followed by two\-line from\-file/to\-file header \-\-\- a/file +++ b/file .fi -Similar to two\-line header for traditional -\fIunified\fR -diff format, -/dev/null -is used to signal created or deleted files. +Similar to two\-line header for traditional \fIunified\fR diff format, /dev/null is used to signal created or deleted files. .TP 4. -Chunk header format is modified to prevent people from accidentally feeding it to -patch \-p1. Combined diff format was created for review of merge commit changes, and was not meant for apply. The change is similar to the change in the extended -\fIindex\fR -header: +Chunk header format is modified to prevent people from accidentally feeding it to patch \-p1. Combined diff format was created for review of merge commit changes, and was not meant for apply. The change is similar to the change in the extended \fIindex\fR header: .sp .nf @@@ @@@ .fi -There are (number of parents + 1) -@ -characters in the chunk header for combined diff format. +There are (number of parents + 1) @ characters in the chunk header for combined diff format. + Unlike the traditional \fIunified\fR diff format, which shows two files A and B with a single column that has \- (minus \(em appears in A but removed in B), + (plus \(em missing in A but added to B), or " " (space \(em 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. -.sp + A \- character in the column N means that the line appears in fileN but it does not appear in the result. A + character in the column N means that the line appears in the last file, and fileN does not have that line (in other words, the line was added, from the point of view of that parent). -.sp + In the above example output, the function signature was changed from both files (hence two \- removals from both file1 and file2, plus ++ to mean one line that was added does not appear in either file1 nor file2). Also two other lines are the same from file1 but do not appear in file2 (hence prefixed with +). -.sp + When shown by git diff\-tree \-c, it compares the parents of a merge commit with the merge result (i.e. file1..fileN are the parents). When shown by git diff\-files \-c, it compares the two unresolved merge parents with the working tree file (i.e. file1 is stage 2 aka "our version", file2 is stage 3 aka "their version"). -.sp .SH "OPERATING MODES" You can choose whether you want to trust the index file entirely (using the \fI\-\-cached\fR flag) or ask the diff logic to show any files that don't match the stat state as being "tentatively changed". Both of these operations are very useful indeed. -.sp .SH "CACHED MODE" If \fI\-\-cached\fR is specified, it allows you to ask: .sp -.sp .nf show me the differences between HEAD and the current index contents (the ones I'd write with a "git\-write\-tree") .fi For example, let's say that you have worked on your working directory, updated some files in the index and are ready to commit. You want to see exactly \fBwhat\fR you are going to commit, without having to write a new tree object and compare it that way, and to do that, you just do .sp -.sp .nf git\-diff\-index \-\-cached HEAD .fi Example: let's say I had renamed commit.c to git\-commit.c, and I had done an "git\-update\-index" to make that effective in the index file. "git\-diff\-files" wouldn't show anything at all, since the index file matches my working directory. But doing a "git\-diff\-index" does: .sp -.sp .nf torvalds@ppc970:~/git> git\-diff\-index \-\-cached HEAD \-100644 blob 4161aecc6700a2eb579e842af0b7f22b98443f74 commit.c +100644 blob 4161aecc6700a2eb579e842af0b7f22b98443f74 git\-commit.c .fi You can see easily that the above is a rename. -.sp + In fact, "git\-diff\-index \-\-cached" \fBshould\fR always be entirely equivalent to actually doing a "git\-write\-tree" and comparing that. Except this one is much nicer for the case where you just want to check where you are. -.sp + So doing a "git\-diff\-index \-\-cached" is basically very useful when you are asking yourself "what have I already marked for being committed, and what's the difference to a previous tree". -.sp .SH "NON\-CACHED MODE" The "non\-cached" mode takes a different approach, and is potentially the more useful of the two in that what it does can't be emulated with a "git\-write\-tree" + "git\-diff\-tree". Thus that's the default mode. The non\-cached version asks the question: .sp -.sp .nf show me the differences between HEAD and the currently checked out tree \- index contents _and_ files that aren't up\-to\-date .fi which is obviously a very useful question too, since that tells you what you \fBcould\fR commit. Again, the output matches the "git\-diff\-tree \-r" output to a tee, but with a twist. -.sp + The twist is that if some file doesn't match the index, we don't have a backing store thing for it, and we use the magic "all\-zero" sha1 to show that. So let's say that you have edited kernel/sched.c, but have not actually done a "git\-update\-index" on it yet \- there is no "object" associated with the new state, and you get: .sp -.sp .nf torvalds@ppc970:~/v2.6/linux> git\-diff\-index HEAD *100644\->100664 blob 7476bb......\->000000...... kernel/sched.c .fi i.e., it shows that the tree has changed, and that kernel/sched.c has is not up\-to\-date and may contain new stuff. The all\-zero sha1 means that to get the real diff, you need to look at the object in the working directory directly rather than do an object\-to\-object diff. .sp -.sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 @@ -433,23 +379,18 @@ i.e., it shows that the tree has changed, and that kernel/sched.c has is not up\ \fBNote\fR As with other commands of this type, "git\-diff\-index" does not actually look at the contents of the file at all. So maybe kernel/sched.c hasn't actually changed, and it's just that you touched it. In either case, it's a note that you need to "git\-update\-index" it to make the index be in sync. .sp -.sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br \fBNote\fR You can have a mixture of files show up as "has been updated" and "is still dirty in the working directory" together. You can always tell which file is in which state, since the "has been updated" ones show a valid sha1, and the "not in sync with the index" ones will always have the special all\-zero sha1. -.sp .SH "AUTHOR" Written by Linus Torvalds -.sp .SH "DOCUMENTATION" Documentation by David Greaves, Junio C Hamano and the git\-list . -.sp .SH "GIT" Part of the \fBgit\fR(7) suite -.sp .SH "REFERENCES" .TP 3 1.\ diffcore documentation diff --git a/man1/git-diff-stages.1 b/man1/git-diff-stages.1 index 66e5db271..15d6d5bb1 100644 --- a/man1/git-diff-stages.1 +++ b/man1/git-diff-stages.1 @@ -2,7 +2,7 @@ .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. -.TH "GIT\-DIFF\-STAGES" "1" "12/06/2006" "" "" +.TH "GIT\-DIFF\-STAGES" "1" "12/16/2006" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) @@ -11,10 +11,8 @@ git\-diff\-stages \- Compares content and mode of blobs between stages in an unmerged index file .SH "SYNOPSIS" \fIgit\-diff\-stages\fR [] [\&...] -.sp .SH "DESCRIPTION" Compares the content and mode of the blobs in two stages in an unmerged index file. -.sp .SH "OPTIONS" .TP \-p @@ -35,6 +33,9 @@ Generate a diffstat. You can override the default output width for 80\-column te \-\-numstat Similar to \-\-stat, but shows number of added and deleted lines in decimal notation and pathname without abbreviation, to make it more machine friendly. .TP +\-\-shortstat +Output only the last line of the \-\-stat format containing total number of modified files, as well as number of added and deleted lines. +.TP \-\-summary Output a condensed summary of extended header information such as creations, renames and mode changes. .TP @@ -81,9 +82,7 @@ Detect renames. Detect copies as well as renames. .TP \-\-diff\-filter=[ACDMRTUXB*] -Select only files that are Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R), have their type (mode) changed (T), are Unmerged (U), are Unknown (X), or have had their pairing Broken (B). Any combination of the filter characters may be used. When -* -(All\-or\-none) is added to the combination, all paths are selected if there is any file that matches other criteria in the comparison; if there is no file that matches other criteria, nothing is selected. +Select only files that are Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R), have their type (mode) changed (T), are Unmerged (U), are Unknown (X), or have had their pairing Broken (B). Any combination of the filter characters may be used. When * (All\-or\-none) is added to the combination, all paths are selected if there is any file that matches other criteria in the comparison; if there is no file that matches other criteria, nothing is selected. .TP \-\-find\-copies\-harder For performance reasons, by default, \-C option finds copies only if the original file of the copy was modified in the same changeset. This flag makes the command inspect unmodified files as candidates for the source of copy. This is a very expensive operation for large projects, so use it with caution. @@ -123,16 +122,15 @@ Ignore white space when comparing lines. This ignores difference even if one lin .TP \-w Shorthand for "\-\-ignore\-all\-space". + For more detailed explanation on these common options, see also [1]\&\fIdiffcore documentation\fR. -.sp .TP , The stage number to be compared. .SH "OUTPUT FORMAT" The output format from "git\-diff\-index", "git\-diff\-tree" and "git\-diff\-files" are very similar. -.sp + These commands all compare two sets of things; what is compared differs: -.sp .TP git\-diff\-index compares the and the files on the filesystem. @@ -145,9 +143,9 @@ compares the trees named by the two arguments. .TP git\-diff\-files [\&...] compares the index and the files on the filesystem. + An output line is formatted this way: .sp -.sp .nf in\-place edit :100644 100644 bcd1234... 0123456... M file0 copy\-edit :100644 100644 abcd123... 1234567... C68 file1 file2 @@ -157,7 +155,6 @@ delete :100644 000000 1234567... 0000000... D file5 unmerged :000000 000000 0000000... 0000000... U file6 .fi That is, from the left to the right: -.sp .TP 3 1. a colon. @@ -190,40 +187,32 @@ a space. status, followed by optional "score" number. .TP 11. -a tab or a NUL when -\fI\-z\fR -option is used. +a tab or a NUL when \fI\-z\fR option is used. .TP 12. path for "src" .TP 13. -a tab or a NUL when -\fI\-z\fR -option is used; only exists for C or R. +a tab or a NUL when \fI\-z\fR option is used; only exists for C or R. .TP 14. path for "dst"; only exists for C or R. .TP 15. -an LF or a NUL when -\fI\-z\fR -option is used, to terminate the record. +an LF or a NUL when \fI\-z\fR option is used, to terminate the record. + is shown as all 0's if a file is new on the filesystem and it is out of sync with the index. -.sp + Example: .sp -.sp .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. -.sp .SH "GENERATING PATCHES WITH \-P" When "git\-diff\-index", "git\-diff\-tree", or "git\-diff\-files" are run with a \fI\-p\fR option, they do not produce the output described above; instead they produce a patch file. You can customize the creation of such patches via the GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS environment variables. -.sp + What the \-p option produces is slightly different from the traditional diff format. -.sp .TP 3 1. It is preceded with a "git diff" header, that looks like this: @@ -231,23 +220,9 @@ It is preceded with a "git diff" header, that looks like this: .nf diff \-\-git a/file1 b/file2 .fi -The -a/ -and -b/ -filenames are the same unless rename/copy is involved. Especially, even for a creation or a deletion, -/dev/null -is _not_ used in place of -a/ -or -b/ -filenames. -.sp -When rename/copy is involved, -file1 -and -file2 -show the name of the source file of the rename/copy and the name of the file that rename/copy produces, respectively. +The a/ and b/ filenames are the same unless rename/copy is involved. Especially, even for a creation or a deletion, /dev/null is _not_ used in place of a/ or b/ filenames. + +When rename/copy is involved, file1 and file2 show the name of the source file of the rename/copy and the name of the file that rename/copy produces, respectively. .TP 2. It is followed by one or more extended header lines: @@ -267,16 +242,10 @@ index .. .fi .TP 3. -TAB, LF, double quote and backslash characters in pathnames are represented as -\\t, -\\n, -\\" -and -\\\\, respectively. If there is need for such substitution then the whole pathname is put in double quotes. +TAB, LF, double quote and backslash characters in pathnames are represented as \\t, \\n, \\" and \\\\, respectively. If there is need for such substitution then the whole pathname is put in double quotes. .SH "COMBINED DIFF FORMAT" 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: .sp -.sp .nf diff \-\-combined describe.c index fabadb8,cc95eb0..4866510 @@ -308,16 +277,12 @@ index fabadb8,cc95eb0..4866510 .fi .TP 3 1. -It is preceded with a "git diff" header, that looks like this (when -\fI\-c\fR -option is used): +It is preceded with a "git diff" header, that looks like this (when \fI\-c\fR option is used): .sp .nf diff \-\-combined file .fi -or like this (when -\fI\-\-cc\fR -option is used): +or like this (when \fI\-\-cc\fR option is used): .sp .nf diff \-\-c file @@ -332,9 +297,7 @@ mode ,.. new file mode deleted file mode , .fi -The -mode ,.. -line appears only if at least one of the is diferent from the rest. Extended headers with information about detected contents movement (renames and copying detection) are designed to work with diff of two and are not used by combined diff format. +The mode ,.. line appears only if at least one of the is diferent from the rest. Extended headers with information about detected contents movement (renames and copying detection) are designed to work with diff of two and are not used by combined diff format. .TP 3. It is followed by two\-line from\-file/to\-file header @@ -343,41 +306,29 @@ It is followed by two\-line from\-file/to\-file header \-\-\- a/file +++ b/file .fi -Similar to two\-line header for traditional -\fIunified\fR -diff format, -/dev/null -is used to signal created or deleted files. +Similar to two\-line header for traditional \fIunified\fR diff format, /dev/null is used to signal created or deleted files. .TP 4. -Chunk header format is modified to prevent people from accidentally feeding it to -patch \-p1. Combined diff format was created for review of merge commit changes, and was not meant for apply. The change is similar to the change in the extended -\fIindex\fR -header: +Chunk header format is modified to prevent people from accidentally feeding it to patch \-p1. Combined diff format was created for review of merge commit changes, and was not meant for apply. The change is similar to the change in the extended \fIindex\fR header: .sp .nf @@@ @@@ .fi -There are (number of parents + 1) -@ -characters in the chunk header for combined diff format. +There are (number of parents + 1) @ characters in the chunk header for combined diff format. + Unlike the traditional \fIunified\fR diff format, which shows two files A and B with a single column that has \- (minus \(em appears in A but removed in B), + (plus \(em missing in A but added to B), or " " (space \(em 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. -.sp + A \- character in the column N means that the line appears in fileN but it does not appear in the result. A + character in the column N means that the line appears in the last file, and fileN does not have that line (in other words, the line was added, from the point of view of that parent). -.sp + In the above example output, the function signature was changed from both files (hence two \- removals from both file1 and file2, plus ++ to mean one line that was added does not appear in either file1 nor file2). Also two other lines are the same from file1 but do not appear in file2 (hence prefixed with +). -.sp + When shown by git diff\-tree \-c, it compares the parents of a merge commit with the merge result (i.e. file1..fileN are the parents). When shown by git diff\-files \-c, it compares the two unresolved merge parents with the working tree file (i.e. file1 is stage 2 aka "our version", file2 is stage 3 aka "their version"). -.sp .SH "AUTHOR" Written by Junio C Hamano -.sp .SH "DOCUMENTATION" Documentation by Junio C Hamano. -.sp .SH "GIT" Part of the \fBgit\fR(7) suite -.sp .SH "REFERENCES" .TP 3 1.\ diffcore documentation diff --git a/man1/git-diff-tree.1 b/man1/git-diff-tree.1 index cbaed2092..6edad0c1a 100644 --- a/man1/git-diff-tree.1 +++ b/man1/git-diff-tree.1 @@ -2,7 +2,7 @@ .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. -.TH "GIT\-DIFF\-TREE" "1" "12/06/2006" "" "" +.TH "GIT\-DIFF\-TREE" "1" "12/16/2006" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) @@ -18,11 +18,10 @@ git\-diff\-tree \- Compares the content and mode of blobs found via two tree obj .fi .SH "DESCRIPTION" Compares the content and mode of the blobs found via two tree objects. -.sp + If there is only one given, the commit is compared with its parents (see \-\-stdin below). -.sp + Note that "git\-diff\-tree" can use the tree encapsulated in a commit object. -.sp .SH "OPTIONS" .TP \-p @@ -43,6 +42,9 @@ Generate a diffstat. You can override the default output width for 80\-column te \-\-numstat Similar to \-\-stat, but shows number of added and deleted lines in decimal notation and pathname without abbreviation, to make it more machine friendly. .TP +\-\-shortstat +Output only the last line of the \-\-stat format containing total number of modified files, as well as number of added and deleted lines. +.TP \-\-summary Output a condensed summary of extended header information such as creations, renames and mode changes. .TP @@ -89,9 +91,7 @@ Detect renames. Detect copies as well as renames. .TP \-\-diff\-filter=[ACDMRTUXB*] -Select only files that are Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R), have their type (mode) changed (T), are Unmerged (U), are Unknown (X), or have had their pairing Broken (B). Any combination of the filter characters may be used. When -* -(All\-or\-none) is added to the combination, all paths are selected if there is any file that matches other criteria in the comparison; if there is no file that matches other criteria, nothing is selected. +Select only files that are Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R), have their type (mode) changed (T), are Unmerged (U), are Unknown (X), or have had their pairing Broken (B). Any combination of the filter characters may be used. When * (All\-or\-none) is added to the combination, all paths are selected if there is any file that matches other criteria in the comparison; if there is no file that matches other criteria, nothing is selected. .TP \-\-find\-copies\-harder For performance reasons, by default, \-C option finds copies only if the original file of the copy was modified in the same changeset. This flag makes the command inspect unmodified files as candidates for the source of copy. This is a very expensive operation for large projects, so use it with caution. @@ -131,16 +131,14 @@ Ignore white space when comparing lines. This ignores difference even if one lin .TP \-w Shorthand for "\-\-ignore\-all\-space". + For more detailed explanation on these common options, see also [1]\&\fIdiffcore documentation\fR. -.sp .TP The id of a tree object. .TP \&... -If provided, the results are limited to a subset of files matching one of these prefix strings. i.e., file matches -/^||\&.../ -Note that this parameter does not provide any wildcard or regexp features. +If provided, the results are limited to a subset of files matching one of these prefix strings. i.e., file matches /^||\&.../ Note that this parameter does not provide any wildcard or regexp features. .TP \-r recurse into sub\-trees @@ -149,46 +147,24 @@ recurse into sub\-trees show tree entry itself as well as subtrees. Implies \-r. .TP \-\-root -When -\fI\-\-root\fR -is specified the initial commit will be showed as a big creation event. This is equivalent to a diff against the NULL tree. +When \fI\-\-root\fR is specified the initial commit will be showed as a big creation event. This is equivalent to a diff against the NULL tree. .TP \-\-stdin -When -\fI\-\-stdin\fR -is specified, the command does not take arguments from the command line. Instead, it reads either one or a pair of separated with a single space from its standard input. -.sp +When \fI\-\-stdin\fR is specified, the command does not take arguments from the command line. Instead, it reads either one or a pair of separated with a single space from its standard input. + When a single commit is given on one line of such input, it compares the commit with its parents. The following flags further affects its behavior. This does not apply to the case where two separated with a single space are given. .TP \-m -By default, "git\-diff\-tree \-\-stdin" does not show differences for merge commits. With this flag, it shows differences to that commit from all of its parents. See also -\fI\-c\fR. +By default, "git\-diff\-tree \-\-stdin" does not show differences for merge commits. With this flag, it shows differences to that commit from all of its parents. See also \fI\-c\fR. .TP \-s -By default, "git\-diff\-tree \-\-stdin" shows differences, either in machine\-readable form (without -\fI\-p\fR) or in patch form (with -\fI\-p\fR). This output can be suppressed. It is only useful with -\fI\-v\fR -flag. +By default, "git\-diff\-tree \-\-stdin" shows differences, either in machine\-readable form (without \fI\-p\fR) or in patch form (with \fI\-p\fR). This output can be suppressed. It is only useful with \fI\-v\fR flag. .TP \-v This flag causes "git\-diff\-tree \-\-stdin" to also show the commit message before the differences. .TP \-\-pretty[=\fI\fR] -Pretty\-prints the details of a commit. -\-\-pretty -without an explicit -= -defaults to -\fImedium\fR. If the commit is a merge, and if the pretty\-format is not -\fIoneline\fR, -\fIemail\fR -or -\fIraw\fR, an additional line is inserted before the -\fIAuthor:\fR -line. This line begins with "Merge: " and the sha1s of ancestral commits are printed, separated by spaces. Note that the listed commits may not necessarily be the list of the -\fBdirect\fR -parent commits if you have limited your view of history: for example, if you are only interested in changes related to a certain directory or file. Here are some additional details for each format: +Pretty\-prints the details of a commit. \-\-pretty without an explicit = defaults to \fImedium\fR. If the commit is a merge, and if the pretty\-format is not \fIoneline\fR, \fIemail\fR or \fIraw\fR, an additional line is inserted before the \fIAuthor:\fR line. This line begins with "Merge: " and the sha1s of ancestral commits are printed, separated by spaces. Note that the listed commits may not necessarily be the list of the \fBdirect\fR parent commits if you have limited your view of history: for example, if you are only interested in changes related to a certain directory or file. Here are some additional details for each format: .RS .TP 3 \(bu @@ -280,63 +256,46 @@ full commit message> .TP \(bu \fIraw\fR -.sp -The -\fIraw\fR -format shows the entire commit exactly as stored in the commit object. Notably, the SHA1s are displayed in full, regardless of whether \-\-abbrev or \-\-no\-abbrev are used, and -\fIparents\fR -information show the true parent commits, without taking grafts nor history simplification into account. + +The \fIraw\fR format shows the entire commit exactly as stored in the commit object. Notably, the SHA1s are displayed in full, regardless of whether \-\-abbrev or \-\-no\-abbrev are used, and \fIparents\fR information show the true parent commits, without taking grafts nor history simplification into account. .RE .TP \-\-no\-commit\-id git\-diff\-tree outputs a line with the commit ID when applicable. This flag suppressed the commit ID output. .TP \-c -This flag changes the way a merge commit is displayed (which means it is useful only when the command is given one , or -\fI\-\-stdin\fR). It shows the differences from each of the parents to the merge result simultaneously instead of showing pairwise diff between a parent and the result one at a time (which is what the -\fI\-m\fR -option does). Furthermore, it lists only files which were modified from all parents. +This flag changes the way a merge commit is displayed (which means it is useful only when the command is given one , or \fI\-\-stdin\fR). It shows the differences from each of the parents to the merge result simultaneously instead of showing pairwise diff between a parent and the result one at a time (which is what the \fI\-m\fR option does). Furthermore, it lists only files which were modified from all parents. .TP \-\-cc -This flag changes the way a merge commit patch is displayed, in a similar way to the -\fI\-c\fR -option. It implies the -\fI\-c\fR -and -\fI\-p\fR -options and further compresses the patch output by omitting hunks that show differences from only one parent, or show the same change from all but one parent for an Octopus merge. When this optimization makes all hunks disappear, the commit itself and the commit log message is not shown, just like in any other "empty diff" case. +This flag changes the way a merge commit patch is displayed, in a similar way to the \fI\-c\fR option. It implies the \fI\-c\fR and \fI\-p\fR options and further compresses the patch output by omitting hunks that show differences from only one parent, or show the same change from all but one parent for an Octopus merge. When this optimization makes all hunks disappear, the commit itself and the commit log message is not shown, just like in any other "empty diff" case. .TP \-\-always Show the commit itself and the commit log message even if the diff itself is empty. .SH "LIMITING OUTPUT" If you're only interested in differences in a subset of files, for example some architecture\-specific files, you might do: .sp -.sp .nf git\-diff\-tree \-r arch/ia64 include/asm\-ia64 .fi and it will only show you what changed in those two directories. -.sp + Or if you are searching for what changed in just kernel/sched.c, just do .sp -.sp .nf git\-diff\-tree \-r kernel/sched.c .fi and it will ignore all differences to other files. -.sp + The pattern is always the prefix, and is matched exactly. There are no wildcards. Even stricter, it has to match a complete path component. I.e. "foo" does not pick up foobar.h. "foo" does match foo/bar.h so it can be used to name subdirectories. -.sp + An example of normal usage is: .sp -.sp .nf torvalds@ppc970:~/git> git\-diff\-tree 5319e4...... *100664\->100664 blob ac348b.......\->a01513....... git\-fsck\-objects.c .fi which tells you that the last commit changed just one file (it's from this one: .sp -.sp .nf commit 3c6f7ca19ad4043e9e72fa94106f352897e651a8 tree 5319e4d609cdd282069cc4dce33c1db559539b03 @@ -350,12 +309,10 @@ Once I do the reference tracking, I'll also make it print out all the HEAD commits it finds, which is even more interesting. .fi in case you care). -.sp .SH "OUTPUT FORMAT" The output format from "git\-diff\-index", "git\-diff\-tree" and "git\-diff\-files" are very similar. -.sp + These commands all compare two sets of things; what is compared differs: -.sp .TP git\-diff\-index compares the and the files on the filesystem. @@ -368,9 +325,9 @@ compares the trees named by the two arguments. .TP git\-diff\-files [\&...] compares the index and the files on the filesystem. + An output line is formatted this way: .sp -.sp .nf in\-place edit :100644 100644 bcd1234... 0123456... M file0 copy\-edit :100644 100644 abcd123... 1234567... C68 file1 file2 @@ -380,7 +337,6 @@ delete :100644 000000 1234567... 0000000... D file5 unmerged :000000 000000 0000000... 0000000... U file6 .fi That is, from the left to the right: -.sp .TP 3 1. a colon. @@ -413,40 +369,32 @@ a space. status, followed by optional "score" number. .TP 11. -a tab or a NUL when -\fI\-z\fR -option is used. +a tab or a NUL when \fI\-z\fR option is used. .TP 12. path for "src" .TP 13. -a tab or a NUL when -\fI\-z\fR -option is used; only exists for C or R. +a tab or a NUL when \fI\-z\fR option is used; only exists for C or R. .TP 14. path for "dst"; only exists for C or R. .TP 15. -an LF or a NUL when -\fI\-z\fR -option is used, to terminate the record. +an LF or a NUL when \fI\-z\fR option is used, to terminate the record. + is shown as all 0's if a file is new on the filesystem and it is out of sync with the index. -.sp + Example: .sp -.sp .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. -.sp .SH "GENERATING PATCHES WITH \-P" When "git\-diff\-index", "git\-diff\-tree", or "git\-diff\-files" are run with a \fI\-p\fR option, they do not produce the output described above; instead they produce a patch file. You can customize the creation of such patches via the GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS environment variables. -.sp + What the \-p option produces is slightly different from the traditional diff format. -.sp .TP 3 1. It is preceded with a "git diff" header, that looks like this: @@ -454,23 +402,9 @@ It is preceded with a "git diff" header, that looks like this: .nf diff \-\-git a/file1 b/file2 .fi -The -a/ -and -b/ -filenames are the same unless rename/copy is involved. Especially, even for a creation or a deletion, -/dev/null -is _not_ used in place of -a/ -or -b/ -filenames. -.sp -When rename/copy is involved, -file1 -and -file2 -show the name of the source file of the rename/copy and the name of the file that rename/copy produces, respectively. +The a/ and b/ filenames are the same unless rename/copy is involved. Especially, even for a creation or a deletion, /dev/null is _not_ used in place of a/ or b/ filenames. + +When rename/copy is involved, file1 and file2 show the name of the source file of the rename/copy and the name of the file that rename/copy produces, respectively. .TP 2. It is followed by one or more extended header lines: @@ -490,16 +424,10 @@ index .. .fi .TP 3. -TAB, LF, double quote and backslash characters in pathnames are represented as -\\t, -\\n, -\\" -and -\\\\, respectively. If there is need for such substitution then the whole pathname is put in double quotes. +TAB, LF, double quote and backslash characters in pathnames are represented as \\t, \\n, \\" and \\\\, respectively. If there is need for such substitution then the whole pathname is put in double quotes. .SH "COMBINED DIFF FORMAT" 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: .sp -.sp .nf diff \-\-combined describe.c index fabadb8,cc95eb0..4866510 @@ -531,16 +459,12 @@ index fabadb8,cc95eb0..4866510 .fi .TP 3 1. -It is preceded with a "git diff" header, that looks like this (when -\fI\-c\fR -option is used): +It is preceded with a "git diff" header, that looks like this (when \fI\-c\fR option is used): .sp .nf diff \-\-combined file .fi -or like this (when -\fI\-\-cc\fR -option is used): +or like this (when \fI\-\-cc\fR option is used): .sp .nf diff \-\-c file @@ -555,9 +479,7 @@ mode ,.. new file mode deleted file mode , .fi -The -mode ,.. -line appears only if at least one of the is diferent from the rest. Extended headers with information about detected contents movement (renames and copying detection) are designed to work with diff of two and are not used by combined diff format. +The mode ,.. line appears only if at least one of the is diferent from the rest. Extended headers with information about detected contents movement (renames and copying detection) are designed to work with diff of two and are not used by combined diff format. .TP 3. It is followed by two\-line from\-file/to\-file header @@ -566,41 +488,29 @@ It is followed by two\-line from\-file/to\-file header \-\-\- a/file +++ b/file .fi -Similar to two\-line header for traditional -\fIunified\fR -diff format, -/dev/null -is used to signal created or deleted files. +Similar to two\-line header for traditional \fIunified\fR diff format, /dev/null is used to signal created or deleted files. .TP 4. -Chunk header format is modified to prevent people from accidentally feeding it to -patch \-p1. Combined diff format was created for review of merge commit changes, and was not meant for apply. The change is similar to the change in the extended -\fIindex\fR -header: +Chunk header format is modified to prevent people from accidentally feeding it to patch \-p1. Combined diff format was created for review of merge commit changes, and was not meant for apply. The change is similar to the change in the extended \fIindex\fR header: .sp .nf @@@ @@@ .fi -There are (number of parents + 1) -@ -characters in the chunk header for combined diff format. +There are (number of parents + 1) @ characters in the chunk header for combined diff format. + Unlike the traditional \fIunified\fR diff format, which shows two files A and B with a single column that has \- (minus \(em appears in A but removed in B), + (plus \(em missing in A but added to B), or " " (space \(em 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. -.sp + A \- character in the column N means that the line appears in fileN but it does not appear in the result. A + character in the column N means that the line appears in the last file, and fileN does not have that line (in other words, the line was added, from the point of view of that parent). -.sp + In the above example output, the function signature was changed from both files (hence two \- removals from both file1 and file2, plus ++ to mean one line that was added does not appear in either file1 nor file2). Also two other lines are the same from file1 but do not appear in file2 (hence prefixed with +). -.sp + When shown by git diff\-tree \-c, it compares the parents of a merge commit with the merge result (i.e. file1..fileN are the parents). When shown by git diff\-files \-c, it compares the two unresolved merge parents with the working tree file (i.e. file1 is stage 2 aka "our version", file2 is stage 3 aka "their version"). -.sp .SH "AUTHOR" Written by Linus Torvalds -.sp .SH "DOCUMENTATION" Documentation by David Greaves, Junio C Hamano and the git\-list . -.sp .SH "GIT" Part of the \fBgit\fR(7) suite -.sp .SH "REFERENCES" .TP 3 1.\ diffcore documentation diff --git a/man1/git-diff.1 b/man1/git-diff.1 index 37d7c1c1b..8496bee94 100644 --- a/man1/git-diff.1 +++ b/man1/git-diff.1 @@ -2,7 +2,7 @@ .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. -.TH "GIT\-DIFF" "1" "12/14/2006" "" "" +.TH "GIT\-DIFF" "1" "12/16/2006" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) @@ -10,7 +10,7 @@ .SH "NAME" git\-diff \- Show changes between commits, commit and working tree, etc .SH "SYNOPSIS" -\fIgit\-diff\fR [ \-\-diff\-options ] {0,2} [\&...] +\fIgit\-diff\fR [ \-\-diff\-options ] {0,2} [\-\-] [\&...] .SH "DESCRIPTION" Show changes between two trees, a tree and the working tree, a tree and the index file, or the index file and the working tree. .TP @@ -20,10 +20,10 @@ This form is to view the changes you made relative to the index (staging area fo \fIgit\-diff\fR [\-\-options] \-\-cached [] [\-\-] [\&...] This form is to view the changes you staged for the next commit relative to the named . Typically you would want comparison with the latest commit, so if you do not give , it defaults to HEAD. .TP -\fIgit\-diff\fR [\-\-options] \(em [\&...] +\fIgit\-diff\fR [\-\-options] [\-\-] [\&...] This form is to view the changes you have in your working tree relative to the named . You can use HEAD to compare it with the latest commit, or a branch name to compare with the tip of a different branch. .TP -\fIgit\-diff\fR [\-\-options] \(em [\&...] +\fIgit\-diff\fR [\-\-options] [\-\-] [\&...] This form is to view the changes between two , for example, tips of two branches. Just in case if you are doing something exotic, it should be noted that all of the in the above description can be any . @@ -47,6 +47,9 @@ Generate a diffstat. You can override the default output width for 80\-column te \-\-numstat Similar to \-\-stat, but shows number of added and deleted lines in decimal notation and pathname without abbreviation, to make it more machine friendly. .TP +\-\-shortstat +Output only the last line of the \-\-stat format containing total number of modified files, as well as number of added and deleted lines. +.TP \-\-summary Output a condensed summary of extended header information such as creations, renames and mode changes. .TP diff --git a/man1/git-repo-config.1 b/man1/git-repo-config.1 index 444e338f2..3e178f855 100644 --- a/man1/git-repo-config.1 +++ b/man1/git-repo-config.1 @@ -2,7 +2,7 @@ .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. -.TH "GIT\-REPO\-CONFIG" "1" "12/13/2006" "" "" +.TH "GIT\-REPO\-CONFIG" "1" "12/16/2006" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) @@ -13,6 +13,7 @@ git\-repo\-config \- Get and set repository or global options. .sp .nf \fIgit\-repo\-config\fR [\-\-global] [type] name [value [value_regex]] +\fIgit\-repo\-config\fR [\-\-global] [type] \-\-add name value \fIgit\-repo\-config\fR [\-\-global] [type] \-\-replace\-all name [value [value_regex]] \fIgit\-repo\-config\fR [\-\-global] [type] \-\-get name [value_regex] \fIgit\-repo\-config\fR [\-\-global] [type] \-\-get\-all name [value_regex] @@ -23,7 +24,7 @@ git\-repo\-config \- Get and set repository or global options. .SH "DESCRIPTION" You can query/set/replace/unset options with this command. The name is actually the section and the key separated by a dot, and the value will be escaped. -If you want to set/unset an option which can occur on multiple lines, a POSIX regexp value_regex needs to be given. Only the existing values that match the regexp are updated or unset. If you want to handle the lines that do \fBnot\fR match the regex, just prepend a single exclamation mark in front (see EXAMPLES). +Multiple lines can be added to an option by using the \fI\-\-add\fR option. If you want to update or unset an option which can occur on multiple lines, a POSIX regexp value_regex needs to be given. Only the existing values that match the regexp are updated or unset. If you want to handle the lines that do \fBnot\fR match the regex, just prepend a single exclamation mark in front (see EXAMPLES). The type specifier can be either \fI\-\-int\fR or \fI\-\-bool\fR, which will make \fIgit\-repo\-config\fR ensure that the variable(s) are of the given type and convert the value to the canonical form (simple decimal number for int, a "true" or "false" string for bool). If no type specifier is passed, no checks or transformations are performed on the value. @@ -54,6 +55,9 @@ you use \-\-global option without $HOME being properly set. \-\-replace\-all Default behavior is to replace at most one line. This replaces all lines matching the key (and optionally the value_regex). .TP +\-\-add +Adds a new line to the option without altering any existing values. This is the same as providing \fI^$\fR as the value_regex. +.TP \-\-get Get the value for a given key (optionally filtered by a regex matching the value). Returns error code 1 if the key was not found and error code 2 if multiple key values were found. .TP @@ -174,6 +178,11 @@ To actually match only values with an exclamation mark, you have to .nf % git repo\-config section.key value '[!]' .fi +To add a new proxy, without altering any of the existing ones, use +.sp +.nf +% git repo\-config core.gitproxy '"proxy" for example.com' +.fi .SH "CONFIGURATION FILE" The git configuration file contains a number of variables that affect the git command's behavior. They can be used by both the git plumbing and the porcelains. The variables are divided into sections, where in the fully qualified variable name the variable itself is the last dot\-separated segment and the section name is everything before the last dot. The variable names are case\-insensitive and only alphanumeric characters are allowed. Some variables may appear multiple times. @@ -215,8 +224,13 @@ Updates to a ref is logged to the file "$GIT_DIR/logs/", by appending .sp .nf This information can be used to determine what commit -was the tip of a branch "2 days ago". This value is -false by default (no automated creation of log files). +was the tip of a branch "2 days ago". +.fi +.sp +.nf +This value is true by default in a repository that has +a working directory associated with it, and false by +default in a bare repository. .fi .TP core.repositoryFormatVersion @@ -259,7 +273,7 @@ color.status A boolean to enable/disable color in the output of \fBgit\-status\fR(1). May be set to true (or always), false (or never) or auto, in which case colors are used only when the output is to a terminal. Defaults to false. .TP color.status. -Use customized color for status colorization. is one of header (the header text of the status message), updated (files which are updated but not committed), changed (files which are changed but not updated in the index), or untracked (files which are not tracked by git). The values of these variables may be specified as in color.diff.. +Use customized color for status colorization. is one of header (the header text of the status message), added or updated (files which are added but not committed), changed (files which are changed but not added in the index), or untracked (files which are not tracked by git). The values of these variables may be specified as in color.diff.. .TP diff.renameLimit The number of files to consider when performing the copy/rename detection; equivalent to the git diff option \fI\-l\fR. diff --git a/man1/git-reset.1 b/man1/git-reset.1 index 43f9ef6bf..4e9615d49 100644 --- a/man1/git-reset.1 +++ b/man1/git-reset.1 @@ -2,7 +2,7 @@ .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. -.TH "GIT\-RESET" "1" "10/03/2006" "" "" +.TH "GIT\-RESET" "1" "12/16/2006" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) @@ -11,23 +11,19 @@ git\-reset \- Reset current HEAD to the specified state .SH "SYNOPSIS" \fIgit\-reset\fR [\-\-mixed | \-\-soft | \-\-hard] [] -.sp .SH "DESCRIPTION" Sets the current head to the specified commit and optionally resets the index and working tree to match. -.sp + This command is useful if you notice some small error in a recent commit (or set of commits) and want to redo that part without showing the undo in the history. -.sp + If you want to undo a commit other than the latest on a branch, \fBgit\-revert\fR(1) is your friend. -.sp .SH "OPTIONS" .TP \-\-mixed Resets the index but not the working tree (i.e., the changed files are preserved but not marked for commit) and reports what has not been updated. This is the default action. .TP \-\-soft -Does not touch the index file nor the working tree at all, but requires them to be in a good order. This leaves all your changed files "Updated but not checked in", as -\fBgit\-status\fR(1) -would put it. +Does not touch the index file nor the working tree at all, but requires them to be in a good order. This leaves all your changed files "Added but not yet committed", as \fBgit\-status\fR(1) would put it. .TP \-\-hard Matches the working tree and index to that of the tree being switched to. Any changes to tracked files in the working tree since are lost. @@ -59,9 +55,7 @@ $ git commit ... $ git reset \-\-hard HEAD~3 \fB(1)\fR .fi .sp -\fB1. \fRThe last three commits (HEAD, HEAD^, and HEAD~2) were bad and you do not want to ever see them again. Do -\fBnot\fR -do this if you have already given these commits to somebody else. +\fB1. \fRThe last three commits (HEAD, HEAD^, and HEAD~2) were bad and you do not want to ever see them again. Do \fBnot\fR do this if you have already given these commits to somebody else. .br .TP Undo a commit, making it a topic branch @@ -142,19 +136,14 @@ $ git reset \fB(3)\fR .sp \fB1. \fRThis commit will get blown away so a throw\-away log message is OK. .br -\fB2. \fRThis removes the -\fIWIP\fR -commit from the commit history, and sets your working tree to the state just before you made that snapshot. +\fB2. \fRThis removes the \fIWIP\fR commit from the commit history, and sets your working tree to the state just before you made that snapshot. .br -\fB3. \fRAt this point the index file still has all the WIP changes you committed as -\fIsnapshot WIP\fR. This updates the index to show your WIP files as uncommitted. +\fB3. \fRAt this point the index file still has all the WIP changes you committed as \fIsnapshot WIP\fR. This updates the index to show your WIP files as uncommitted. .br .SH "AUTHOR" Written by Junio C Hamano and Linus Torvalds -.sp .SH "DOCUMENTATION" Documentation by Junio C Hamano and the git\-list . -.sp .SH "GIT" Part of the \fBgit\fR(7) suite -.sp + diff --git a/man1/git-show.1 b/man1/git-show.1 index a7753b686..97cc01d5d 100644 --- a/man1/git-show.1 +++ b/man1/git-show.1 @@ -2,41 +2,34 @@ .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. -.TH "GIT\-SHOW" "1" "11/23/2006" "" "" +.TH "GIT\-SHOW" "1" "12/16/2006" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -git\-show \- Show one commit with difference it introduces +git\-show \- Show various types of objects .SH "SYNOPSIS" -\fIgit\-show\fR