git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Stefan BellerNext: Jonathan Nieder
Message 6 of 7 in “[RFC] On the --depth argument when fetching with submodules”
  1. Stefan BellerFeb 5, 2016
  2. Junio C HamanoFeb 6, 2016
  3. Fredrik GustafssonFeb 6, 2016
  4. Lars SchneiderFeb 7, 2016
  5. Stefan BellerFeb 8, 2016
  6. Junio C HamanoFeb 8, 2016
  7. Jonathan NiederFeb 8, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.