Junio C Hamano <gitster@xxxxxxxxx> writes: > Calvin Wan <calvinwan@xxxxxxxxxx> writes: > > > Add ‘--object-info’ option to fetch. This option allows the client to > > make an object-info command request to a server that supports protocol > > v2. If the server is v2, but does not allow for the object-info > > command request, fetch the objects as if it were a standard fetch > > (however without changing any refs). Therefore, hook `fetch > > object-info` into transport_fetch_refs() to easily fallback if needed. > > Sorry, but I do not see anything common between "git fetch" that > fetches history and associated objects and "retrieving only object > info". Other than "the way I happened to have chosen to implement, > what is used to implement fetch has the most commonality". Calvin and I discussed details of implementation before he wrote these patches, and my thinking at that time was that to get the relevant information, we're prepared to fetch the objects themselves from the remote if need be, but prefer to fetch only metadata if possible, so putting it in "fetch" seemed reasonable to me. But I agree that it's probably better to put it somewhere else.