Skip to content

Commit b3806f7

Browse files
committed
git: document GIT_NO_REPLACE_OBJECTS environment variable
This variable is used as the primary way to disable the object replacement mechanism, with the "--no-replace-objects" command line option as an end-user visible way to set it, but has not been documented. The original reason why it was left undocumented might be because it was meant as an internal implementation detail, but the thing is, that our tests use the environment variable directly without the command line option, and there certainly are folks who learned its use from there, making it impossible to deprecate or change its behaviour by now. Add documentation and note that for this variable, unlike many boolean-looking environment variables, only the presence matters, not what value it is set to. Signed-off-by: Junio C Hamano <[email protected]>
1 parent c784b0a commit b3806f7

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Documentation/git.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,10 @@ If you just want to run git as if it was started in `<path>` then use
174174
directory.
175175

176176
--no-replace-objects::
177-
Do not use replacement refs to replace Git objects. See
178-
linkgit:git-replace[1] for more information.
177+
Do not use replacement refs to replace Git objects.
178+
This is equivalent to exporting the `GIT_NO_REPLACE_OBJECTS`
179+
environment variable with any value.
180+
See linkgit:git-replace[1] for more information.
179181

180182
--no-lazy-fetch::
181183
Do not fetch missing objects from the promisor remote on
@@ -873,6 +875,10 @@ for full details.
873875
header and packfile URIs. Set this Boolean environment variable to false to prevent this
874876
redaction.
875877

878+
`GIT_NO_REPLACE_OBJECTS`::
879+
Setting and exporting this environment variable tells Git to
880+
ignore replacement refs and do not replace Git objects.
881+
876882
`GIT_LITERAL_PATHSPECS`::
877883
Setting this Boolean environment variable to true will cause Git to treat all
878884
pathspecs literally, rather than as glob patterns. For example,

0 commit comments

Comments
 (0)