Thread (50 messages) 50 messages, 15 authors, 2021-11-30

Re: [Summit topic] The state of getting a reftable backend working in git.git

flat view

From: Philip Oakley <hidden>
Date: 2021-10-28 14:17:41

On 26/10/2021 09:12, Han-Wen Nienhuys wrote:
On Tue, Oct 26, 2021 at 12:16 AM Ævar Arnfjörð Bjarmason
[off-list ref] wrote:
quoted
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
Useful to know that there is a method, though I was distinguishing the
inspection of the data, from the conversion between (in-use) storage types.

My request was more about having an easy access ramp for on-boarding new
users (who are likely to visualise the file system analogy better) than
for experienced Git admins and developers who may need to convert and
interact with the data.

Some aspects (in the wider domain) may be the extending of the
documentation to help users with understanding the ref manipulation and
the meanings of the values.
-- 

Philip
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help