Re: [PATCH] sub-process: print the cmd when a capability is unsupported
- From
Lars Schneider <larsxschneider@gmail.com>
- Date
- Aug 17, 2017, 21:34 UTC
- Message-ID
- <25BB25E4-DD3F-46A5-8CD5-D784CBAB6F52@gmail.com>
- In-Reply-To
- <xmqqbmndgb8w.fsf@gitster.mtv.corp.google.com>
Show 13 quoted lines
> On 17 Aug 2017, at 23:01, Junio C Hamano <gitster@pobox.com> wrote: > > Christian Couder <christian.couder@gmail.com> writes: > >> ... but I think we should then emphasize more in our test >> scripts (maybe by giving a good example) and perhaps also in the doc >> that the filters/sub-processes should really pay attention and not >> output any capability that are not supported by Git. > > Oh, absolutely. If you know there is such a breakage in our test > script, please do fix it. > > Thanks.
Junio's reasoning [1] is spot on from my point of view.
I intentionally did not add the negotiation to the test code to keep the test as simple as possible. However, I wrote this in the gitattributes docs [2]:
After the version negotiation Git sends a list of all capabilities that it supports and a flush packet. Git expects to read a list of desired capabilities, which must be a subset of the supported capabilities list, and a flush packet as response:
Maybe we should revive "Documentation/technical/api-sub-process.txt" [3] after all to explain these kind of things?
- Lars
[1] https://public-inbox.org/git/xmqq8tijpkrv.fsf@gitster.mtv.corp.google.com/ [2] https://github.com/git/git/blob/b3622a4ee94e4916cd05e6d96e41eeb36b941182/Documentation/gitattributes.txt#L408-L411 [3] https://public-inbox.org/git/20170807102136.30b23023@twelve2.svl.corp.google.com/