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

2013-04-08 Thread Jonathan Nieder
Aaron Schrab wrote: > Do not report that an argument to clone's --reference option is not a > local directory. Nothing checks for the existence or type of the path > as supplied by the user; checks are only done for particular contents of > the supposed directory, so we have no way to know the st

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

2013-04-08 Thread Aaron Schrab
Do not report that an argument to clone's --reference option is not a local directory. Nothing checks for the existence or type of the path as supplied by the user; checks are only done for particular contents of the supposed directory, so we have no way to know the status of the supplied path. T

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

2013-04-08 Thread Junio C Hamano
Aaron Schrab writes: >>You may be dealing with an old-style submodule checkout. > > No, the submodule in question was done with the new style. I know that and I wasn't talking about _your_ particular case. I just wanted to make sure people who are reading this thread from sidelines (or finding

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

2013-04-08 Thread Aaron Schrab
At 10:57 -0700 08 Apr 2013, Junio C Hamano wrote: In general I am in favor of resolving a gitfile given to --reference when clone interprets it, and have it use the location of the real underlying object store when it grabs objects not in there from the origin and store the location of the real

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

2013-04-08 Thread Junio C Hamano
Aaron Schrab writes: > At 08:30 -0700 08 Apr 2013, Junio C Hamano wrote: >>You switch to a version of the superproject with a plain file at >>dirA/ or there is nothing at dirA. The checkout will fail and you >>need to manually rectify the situation [*1*], but after that is >>done, you do not ha

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

2013-04-08 Thread Aaron Schrab
At 08:30 -0700 08 Apr 2013, Junio C Hamano wrote: You switch to a version of the superproject with a plain file at dirA/ or there is nothing at dirA. The checkout will fail and you need to manually rectify the situation [*1*], but after that is done, you do not have any repository at /path/to/s

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

2013-04-08 Thread Junio C Hamano
Aaron Schrab writes: > At 06:58 -0700 08 Apr 2013, Junio C Hamano 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 ou

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

2013-04-08 Thread Aaron Schrab
At 06:58 -0700 08 Apr 2013, Junio C Hamano 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 s

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

2013-04-08 Thread Junio C Hamano
Aaron Schrab writes: > At 16:48 -0700 07 Apr 2013, Jonathan Nieder wrote: > >>> 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 director

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

2013-04-07 Thread Aaron Schrab
At 20:06 -0400 07 Apr 2013, I wrote: At 16:48 -0700 07 Apr 2013, Jonathan Nieder wrote: Would it make sense for the message to say something like the following? fatal: alternate object store '/path/to/repo.git/objects' is not a local directory That would also avoid lying to the user

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

2013-04-07 Thread Aaron Schrab
At 16:48 -0700 07 Apr 2013, Jonathan Nieder wrote: Hi Aaron, Thanks for the feedback. Aaron Schrab wrote: 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

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

2013-04-07 Thread Jonathan Nieder
Hi Aaron, Aaron Schrab wrote: > 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

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

2013-04-07 Thread Aaron Schrab
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 fin