git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/2] doc hash-function-transition: clarify how older gits die on NewHash

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Mar 26, 2018, 18:27 UTC
Message-ID
<20180326182708.26551-2-avarab@gmail.com>
In-Reply-To
<20180326182708.26551-1-avarab@gmail.com>

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 ab9cb76f66 ("Repository format version check.", 2005-11-25) and 00a09d57eb ("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 <avarab@gmail.com>
---
 Documentation/technical/hash-function-transition.txt | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/Documentation/technical/hash-function-transition.txt b/Documentation/technical/hash-function-transition.txt
index 417ba491d0..34396f13ec 100644
--- a/Documentation/technical/hash-function-transition.txt
+++ b/Documentation/technical/hash-function-transition.txt
@@ -116,10 +116,15 @@ Documentation/technical/repository-version.txt) with extensions
 		objectFormat = newhash
 		compatObjectFormat = sha1
 
-Specifying a repository format extension ensures that versions of Git
-not aware of NewHash do not try to operate on these repositories,
-instead producing an error message:
+The combination of setting `core.repositoryFormatVersion=1` and
+populating `extensions.*` ensures that all versions of Git later than
+`v0.99.9l` will die instead of trying to operate on the NewHash
+repository, instead producing an error message.
 
+	# Between v0.99.9l and v2.7.0
+	$ git status
+	fatal: Expected git repo version <= 0, found 1
+	# After v2.7.0
 	$ git status
 	fatal: unknown repository extensions found:
 		objectformat
-- 
2.16.2.804.g6dcf76e118
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 2 of 5 in “doc hash-function-transition: minor & major clarifications”
  1. 0/2 doc hash-function-transition: minor & major clarificationsÆvar Arnfjörð Bjarmason, Mar 26, 2018
  2. 1/2 doc hash-function-transition: clarify how older gits die on NewHashÆvar Arnfjörð Bjarmason, Mar 26, 2018
  3. 2/2 doc hash-function-transition: clarify what SHAttered meansÆvar Arnfjörð Bjarmason, Mar 26, 2018
  4. Eric SunshineMar 26, 2018
  5. Stefan BellerMar 26, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.