Re: [PATCH] git-submodule.sh: try harder to fetch a submodule

2018-05-15 Thread Jonathan Nieder
Stefan Beller wrote: > I'll resend it with a warning (using say()). Thanks, makes sense. > I think we have 2 bugs and this is merely fixing the second bug. I'm fearing that there are more than two. [...] > $ git init confused-head > $ (cd confused-head && git branch test \ > $(git

[PATCH] git-submodule.sh: try harder to fetch a submodule

2018-05-15 Thread Stefan Beller
This is the logical continuum of fb43e31f2b4 (submodule: try harder to fetch needed sha1 by direct fetching sha1, 2016-02-23) and fixes it as some assumptions were not correct. The commit states: > If $sha1 was not part of the default fetch ... fail ourselves here > assumes that the

[PATCH] git-submodule.sh: try harder to fetch a submodule

2018-05-15 Thread Stefan Beller
This is the logical continuum of fb43e31f2b4 (submodule: try harder to fetch needed sha1 by direct fetching sha1, 2016-02-23) and fixes it as some assumptions were not correct. The commit states: > If $sha1 was not part of the default fetch ... fail ourselves here > assumes that the

Re: [PATCH] git-submodule.sh: try harder to fetch a submodule

2018-05-15 Thread Stefan Beller
On Fri, May 11, 2018 at 5:03 PM, Junio C Hamano wrote: >> A more typical example would be if the ref simply doesn't exist (i.e., >> is a branch yet to be born). > > Indeed this is interesting. At first glance I thought this was > about underlying "git clone" failing to grab

Re: [PATCH] git-submodule.sh: try harder to fetch a submodule

2018-05-11 Thread Junio C Hamano
Jonathan Nieder writes: >> HEAD is allowed by the protocol spec and would happen, if HEAD points at a >> ref, that this user cannot see (due to ACLs for example). > > A more typical example would be if the ref simply doesn't exist (i.e., > is a branch yet to be born). Indeed

Re: [PATCH] git-submodule.sh: try harder to fetch a submodule

2018-05-11 Thread Stefan Beller
On Fri, May 11, 2018 at 4:28 PM, Jonathan Nieder wrote: > Hi, > > Stefan Beller wrote: > >> This is the logical continuum of fb43e31f2b4 (submodule: try harder to >> fetch needed sha1 by direct fetching sha1, 2016-02-23) and fixes it as >> some assumptions were not correct. >

Re: [PATCH] git-submodule.sh: try harder to fetch a submodule

2018-05-11 Thread Jonathan Nieder
Hi, Stefan Beller wrote: > This is the logical continuum of fb43e31f2b4 (submodule: try harder to > fetch needed sha1 by direct fetching sha1, 2016-02-23) and fixes it as > some assumptions were not correct. Interesting. I think what would help most is an example set of commands I can use to

[PATCH] git-submodule.sh: try harder to fetch a submodule

2018-05-11 Thread Stefan Beller
This is the logical continuum of fb43e31f2b4 (submodule: try harder to fetch needed sha1 by direct fetching sha1, 2016-02-23) and fixes it as some assumptions were not correct. > If $sha1 was not part of the default fetch ... fail ourselves here assumes that the fetch_in_submodule only fails when