Re: [Summit topic] The state of getting a reftable backend working in git.git
flat view
From: Han-Wen Nienhuys <hidden>
Date: 2021-10-26 08:12:21
On Tue, Oct 26, 2021 at 12:16 AM Ævar Arnfjörð Bjarmason [off-list ref] wrote:
From memory I think the more general concern Philip Oakley was also expressing (but maybe he'll chime in) could also be addressed by a tool that just un-reftable-ifies a repository. I think such a thing would be useful, and I think we don't have that already. Isn't the files backend or reftable usage now an "init"-time setting. .. Maybe there's more complexity I'm not considering than just the *.lock dance in .git/*, but if not such a tool could also convert freely between the two backends, so you could try refable out in an existing checkout.
I added a convert-ref-storage command to the JGit command line client
for exactly this,
$ jgit convert-ref-storage -h
jgit convert-ref-storage [--format VAL] [--help (-h)] [--ssh [JSCH | APACHE]]
--format VAL : Format to convert to (reftable or refdir) (default:
reftable)
--help (-h) : display this help text (default: true)
--ssh [JSCH | APACHE] : Selects the built-in ssh library to use, JSch or
Apache MINA sshd. (default: JSCH)
See here[1] for implementation. It's not safe for concurrent use with
other git commands, but that's hardly a common use-case.
[1] https://eclipse.googlesource.com/gerrit/jgit/jgit/+/1825a2230c06e7a6cbe23c69b63c3b7ecd2ceac6/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java#806
--
Han-Wen Nienhuys - Google Munich
I work 80%. Don't expect answers from me on Fridays.
--
Google Germany GmbH, Erika-Mann-Strasse 33, 80636 Munich
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado