Skip to content

Commit aea93a7

Browse files
committed
Diffing and merging
1 parent 5c9428c commit aea93a7

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

book/11-git-internals/sections/environment.asc

+15-5
Original file line numberDiff line numberDiff line change
@@ -105,16 +105,26 @@ The default is a value like `git/2.0.0`.
105105

106106
==== Diffing and Merging
107107

108-
*GIT_DIFF_OPTS*
108+
*GIT_DIFF_OPTS* is a bit of a misnomer.
109+
The only valid values are `-u<n>` or `--unified=<n>`, which controls the number of context lines shown in a `git diff` command.
109110

110-
*GIT_EXTERNAL_DIFF*
111+
*GIT_EXTERNAL_DIFF* is used as an override for the `diff.external` configuration value.
112+
If it's set, Git will invoke this program when `git diff` is invoked.
111113

112-
*GIT_DIFF_PATH_COUNTER*
114+
*GIT_DIFF_PATH_COUNTER* and *GIT_DIFF_PATH_TOTAL* are useful when you're using `GIT_EXTERNAL_DIFF` or `diff.external`.
115+
The former represents which file in a series is being diffed (starting with 1), and the latter is the total number of files in the batch.
113116

114-
*GIT_DIFF_PATH_TOTAL*
117+
*GIT_MERGE_VERBOSITY* controls the output for the recursive merge strategy.
118+
The allowed values are as follows:
115119

116-
*GIT_MERGE_VERBOSITY*
120+
* 0 outputs nothing, except possibly a single error message.
121+
* 1 shows only conflicts.
122+
* 2 also shows file changes.
123+
* 3 shows when files are skipped because they haven't changed.
124+
* 4 shows all paths as they are processed.
125+
* 5 and above show detailed debugging information.
117126

127+
The default value is 2.
118128

119129
==== Debugging
120130

0 commit comments

Comments
 (0)