Re: [PATCH 1/2] clone: Fix error message for reference repository

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH 1/2] clone: Fix error message for reference repository

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:56:43

Aaron Schrab [off-list ref] writes:
At 16:48 -0700 07 Apr 2013, Jonathan Nieder [off-list ref] wrote:
quoted
quoted
Do not report an argument to clone's --reference option is not a local
directory.  Nothing checks for the actual directory so we have no way to
know if whether or not exists.  Telling the user that a directory doesn't
exist when that isn't actually known may lead him or her on the wrong
path to finding the problem.
I don't understand the above explanation.  Could you give an example?
I originally noticed this while trying to use a submodule as a
reference repository.
I do agree that it would be nice to dereference .git gitfile when we
deal with --reference argument, but you do not want to use in-tree
repository of a submodule working tree.  What happens when you have
to check out a version of the containing superproject that did not
have the submodule you are borrowing from?  The directory will
disappear, leaving the borrowing repository still pointing at it
with its .git/objects/info/alternates file, no?

Re: [PATCH 1/2] clone: Fix error message for reference repository

From: Aaron Schrab <hidden>
Date: 2016-06-15 22:56:44

At 06:58 -0700 08 Apr 2013, Junio C Hamano [off-list ref] wrote:
I do agree that it would be nice to dereference .git gitfile when we
deal with --reference argument, but you do not want to use in-tree
repository of a submodule working tree.  What happens when you have
to check out a version of the containing superproject that did not
have the submodule you are borrowing from?  The directory will
disappear, leaving the borrowing repository still pointing at it
with its .git/objects/info/alternates file, no?
No, submodule directories don't get removed when you checkout a version 
which didn't contain that submodule.  I believe that there are plans to 
change that for submodules which store the repository data under the 
containing project's .git directory; but removing the submodule working 
tree would not affect a repository using that submodule as a reference, 
since the reading of the .git file is only done during the initial 
clone.  I don't think that the risk of such a repository being deleted 
or moved is substantially higher than for any other repository.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help