diff options
author | youtirsin <youtirsin@qq.com> | 2025-01-08 16:26:55 +0800 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2025-01-09 08:32:40 +0000 |
commit | e5e2e026987f9f5ae9abf25e9de366e3c59a5dd3 (patch) | |
tree | c686b20e5fb940cf36cf82e1f70e8078e23668c4 | |
parent | 24555e570b9fe4af523de530e4a762c7cbfa8805 (diff) | |
download | jgit-e5e2e026987f9f5ae9abf25e9de366e3c59a5dd3.tar.gz jgit-e5e2e026987f9f5ae9abf25e9de366e3c59a5dd3.zip |
Set repositoryformatversion=0 when converting refStorage to files
See https://git-scm.com/docs/repository-version#_version_1
Change-Id: Ic71e55f5dfd4dacedabe54a5881a56b72659f3bc
Signed-off-by: youtirsin <youtirsin@qq.com>
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java index c5c36565d9..207ced0314 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java @@ -743,6 +743,8 @@ public class FileRepository extends Repository { } repoConfig.unset(ConfigConstants.CONFIG_EXTENSIONS_SECTION, null, ConfigConstants.CONFIG_KEY_REF_STORAGE); + repoConfig.setLong(ConfigConstants.CONFIG_CORE_SECTION, null, + ConfigConstants.CONFIG_KEY_REPO_FORMAT_VERSION, 0); repoConfig.save(); } |