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

Re: [BUG] allowtipsha1inwant serves unreachable blobs if you know its hash

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 23, 2017, 23:59 UTC
Message-ID
<xmqqpoi85ui3.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<xmqqtw7k5uxj.fsf@gitster.mtv.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 17 quoted lines
> Jonathan Tan <jonathantanmy@google.com> writes:
>
>> Adding "--objects" works, and all existing tests pass, except for the
>> potential performance issue and the side effect that even fetching a
>> reachable blob no longer works. This is due to a possible bug where a
>> call like "git rev-list --objects $tree ^master" (where $tree is the
>> tree object corresponding to master) prints out objects ...
>
> The "reachable from this, excluding what is reachable from that"
> notation was originally designed to work only on commits, and I
> wouldn't be surprised if "$tree ^master" did not work as you expect
> in the current implementation.
>
> I agree that ideally it shouldn't show anything, but I suspect that
> it would make it very expensive if done naively---we'd end up having
> to call mark_tree_uninteresting() for all uninteresting commits, not
> just for the commits at the edge of the DAG as we do right now.

BTW, by "it would be expensive" I didn't mean "hence it shouldn't be done." Even though I do not know by how much expensive it would become, I think this approach is a lot better way going forward than punting and say "no, you cannot specify anything lower than commit."

Thanks for looking into this.
Previous: Jeff KingNext: Jeff King
Message 4 of 5 in “[BUG] allowtipsha1inwant serves unreachable blobs if you know its hash”
  1. Jonathan TanFeb 23, 2017
  2. Junio C HamanoFeb 23, 2017
  3. Jeff KingFeb 24, 2017
  4. Junio C HamanoFeb 23, 2017
  5. Jeff KingFeb 24, 2017

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.