Skip to content

Commit 45fa195

Browse files
avargitster
authored andcommitted
doc hash-function-transition: clarify how older gits die on NewHash
Change the "Repository format extension" to accurately describe what happens with different versions of Git when they encounter NewHash repositories, instead of only saying what happens with versions v2.7.0 and later. See ab9cb76 ("Repository format version check.", 2005-11-25) and 00a09d5 ("introduce "extensions" form of core.repositoryformatversion", 2015-06-23) for the relevant changes to the setup code where these variables are checked. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 90bbd50 commit 45fa195

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Documentation/technical/hash-function-transition.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,15 @@ Documentation/technical/repository-version.txt) with extensions
116116
objectFormat = newhash
117117
compatObjectFormat = sha1
118118

119-
Specifying a repository format extension ensures that versions of Git
120-
not aware of NewHash do not try to operate on these repositories,
121-
instead producing an error message:
119+
The combination of setting `core.repositoryFormatVersion=1` and
120+
populating `extensions.*` ensures that all versions of Git later than
121+
`v0.99.9l` will die instead of trying to operate on the NewHash
122+
repository, instead producing an error message.
122123

124+
# Between v0.99.9l and v2.7.0
125+
$ git status
126+
fatal: Expected git repo version <= 0, found 1
127+
# After v2.7.0
123128
$ git status
124129
fatal: unknown repository extensions found:
125130
objectformat

0 commit comments

Comments
 (0)