Re: [RFC] On the --depth argument when fetching with submodules
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 8, 2016, 20:18 UTC
- Message-ID
- <xmqq8u2v7y7x.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CAGZ79kYT8EWv6T=3bW_fH+_Q8p74p=JyzbErB+TOPO2VtVQHgQ@mail.gmail.com>
Stefan Beller <sbeller@google.com> writes:
Show 5 quoted lines
> ... Instead of the branch, you can just pass > a sha1 to git fetch and it sometimes works (if the server permits fetching > arbitrary or hidden sha1s. Though Jonathan noted this check may be in > the client only and the server trusts the client on not wanting arbitrary > sha1s?)
allowtipsha1inwant and allowreachablesha1inwant are the server side controls that are by default off.
> So for fetching I think we need to have a "--try-to-get-commit <sha1>" > argument for fetch, which depending on the server capabilities and > the history obtained otherwise may try again to fetch the exact sha1.
Hmph, "try"? t5516 seems to show how to do this.
I however have to wonder how we disambiguate a 40-hex that is an object name and a branch whose name happens to be 40-hex.