Thread (61 messages) flat view 61 messages, 3 authors, 2017-09-15

Re: [RFC/PATCH v4 00/49] Add initial experimental external ODB support

From: Christian Couder <hidden>
Date: 2017-07-01 20:12:56

On Sat, Jul 1, 2017 at 9:41 PM, Christian Couder
[off-list ref] wrote:
On Fri, Jun 23, 2017 at 8:24 PM, Ben Peart [off-list ref] wrote:
quoted
The fact that "git clone is taught a --initial-refspec" option" indicates
this isn't just an ODB implementation detail.  Is there a general capability
that is missing from the ODB interface that needs to be addressed here?
Technically you don't need to teach `git clone` the --initial-refspec
option to make it work.
It can work like this:

$ git init
$ git remote add origin <originurl>
$ git fetch origin <odbrefspec>
$ git config odb.<odbname>.command <helper>
$ git fetch origin

But it is much simpler for the user to instead just do:

$ git clone -c odb.<odbname>.command=<helper> --initial-refspec
<odbrefspec> <originurl>

I also think that the --initial-refspec option could perhaps be useful
for other kinds of refs for example tags, notes or replace refs, to
make sure that those refs are fetched first and that hooks can use
them when fetching other refs like branches in the later part of the
clone.
Actually I am not sure that it's possible to setup hooks per se before
or while cloning, but perhaps there are other kind of scripts or git
commands that could trigger and use the refs that have been fetched
first.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help