diff options
author | Han-Wen Nienhuys <hanwen@google.com> | 2020-02-18 20:44:10 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2020-03-04 15:45:01 +0100 |
commit | 30fb4808f2407cbea6c8cf46189033b0231aa423 (patch) | |
tree | eb967e3c0a464f7402c8c7fe0ed6e2c9930f4e83 /org.eclipse.jgit/src/org/eclipse/jgit/lib | |
parent | 6f268f8cebbc53a9810f0fe6ca1a961a32d8b074 (diff) | |
download | jgit-30fb4808f2407cbea6c8cf46189033b0231aa423.tar.gz jgit-30fb4808f2407cbea6c8cf46189033b0231aa423.zip |
Update reftable storage repo layout
The change Ic0b974fa (c217d33, "Documentation/technical/reftable:
improve repo layout") defines a new repository layout, which was
agreed with the git-core mailing list.
It addresses the following problems:
* old git clients will not recognize reftable-based repositories, and
look at encompassing directories.
* Poorly written tools might write directly into
.git/refs/heads/BRANCH.
Since we consider JGit reftable as experimental (git-core doesn't
support it yet), we have no backward compatibility. If you created a
repository with reftable between mid-Nov 2019 and now, you can do the
following to convert:
mv .git/refs .git/reftable/tables.list
git config core.repositoryformatversion 1
git config extensions.refStorage reftable
Change-Id: I80df35b9d22a8ab893dcbe9fbd051d924788d6a5
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/lib')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java | 21 | ||||
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java | 6 |
2 files changed, 27 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java index 695903d049..99512a6a4a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java @@ -444,6 +444,12 @@ public final class ConfigConstants { public static final String CONFIG_RENAMELIMIT_COPIES = "copies"; /** + * A "refStorage" value in the "extensions". + * @since 5.6.2 + */ + public static final String CONFIG_REF_STORAGE_REFTABLE = "reftable"; + + /** * The "renames" key in the "diff" section * @since 3.0 */ @@ -538,9 +544,24 @@ public final class ConfigConstants { */ public static final String CONFIG_KEY_MIN_RACY_THRESHOLD = "minRacyThreshold"; + + /** + * The "refStorage" key + * + * @since 5.6.2 + */ + public static final String CONFIG_KEY_REF_STORAGE = "refStorage"; + /** * The "jmx" section * @since 5.1.13 */ public static final String CONFIG_JMX_SECTION = "jmx"; + + /** + * The "extensions" section + * + * @since 5.6.2 + */ + public static final String CONFIG_EXTENSIONS_SECTION = "extensions"; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java index abd9dd6d38..3c05cab862 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java @@ -287,6 +287,12 @@ public final class Constants { */ public static final String REFTABLE = "reftable"; + /** + * Reftable table list name. + * @since 5.6.2 + */ + public static final String TABLES_LIST = "tables.list"; + /** Info refs folder */ public static final String INFO_REFS = "info/refs"; |