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

Re: [PATCH] fetch-pack: write effective filter to trace2

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 15, 2022, 20:10 UTC
Message-ID
<xmqqfsj2yw6b.fsf@gitster.g>
In-Reply-To
<20220715190956.2908637-1-jonathantanmy@google.com>
Jonathan Tan <jonathantanmy@google.com> writes:
Show 9 quoted lines
>> >> This is implemented for protocol v0, v1, and v2.
>> 
>> Is that different to say "for all protocols"?  I am wondering if it
>> is worth saying (unlike in a hypothetical case where we do not
>> support v0 and v1 we may want to state why we only support v2).
>
> I wrote it that way to avoid confusion with things like HTTP (which is a
> protocol, at least in its name). Maybe better would be "This is
> implemented for all protocols (v0, v1, and v2)".

I still wonder if it is better left unsaid. When adding a new thing, it would not be noteworthy if the new thing is available no matter what protocol is being used, no?

Show 18 quoted lines
>> >> +		trace2_data_string("fetch", the_repository, "fetch/effective-filter", spec);
>> >>   		packet_buf_write(&req_buf, "filter %s", spec);
>> >> +	} else {
>> >> +		trace2_data_string("fetch", the_repository, "fetch/effective-filter", "none");
>> 
>> Do we show "none" anywhere else where an expanded list objects
>> filter spec is expected?
>
> Hmm...no, we don't.
>
>> I am wondering two things: 
>> 
>>  - The lack of this line would be a cleaner implementation of a
>>    signal to say "this client did not ask any filtering".
>
> I think the presence is important to distinguish "no filtering" versus
> someone using an old Git version that does not emit such traces, but I'm
> open to changing the "none" to "none-specified" or something like that.
OK.
Show 6 quoted lines
>>  - It would be good if we keep what report here more-or-less the
>>    same as what we can pass "--filter=" on the command line of
>>    "git pack-objects".
>
> My intent is to report what is being sent to the server in the fetch
> request.

Then I'd be OK with a design that reports "none", if we send "none" to the server in this case. If not, then I do not think we should.

Perhaps report an empty string or not reporting at all? After all, the reader knows the client version and capability in the log so it is easy to tell between 'no filter was used' and 'too old to report the filter', no? I dunno.

Previous: Jonathan TanNext: Jonathan Tan
Message 5 of 15 in “fetch-pack: write effective filter to trace2”
  1. fetch-pack: write effective filter to trace2Jonathan Tan, Jul 15, 2022
  2. Jeff HostetlerJul 15, 2022
  3. Junio C HamanoJul 15, 2022
  4. Jonathan TanJul 15, 2022
  5. Junio C HamanoJul 15, 2022
  6. Jonathan TanJul 15, 2022
  7. Jeff HostetlerJul 18, 2022
  8. Junio C HamanoJul 18, 2022
  9. Jonathan TanJul 18, 2022
  10. Junio C HamanoJul 18, 2022
  11. fetch-pack: write effective filter to trace2Jonathan Tan, Jul 18, 2022
  12. Junio C HamanoJul 18, 2022
  13. Junio C HamanoJul 25, 2022
  14. Jonathan TanJul 26, 2022
  15. fetch-pack: write effective filter to trace2Jonathan Tan, Jul 26, 2022

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.