]> git.ipfire.org Git - thirdparty/git.git/commit - Documentation/technical/pack-protocol.txt
upload-pack: ignore 'shallow' lines with unknown obj-ids
authorMichael Heemskerk <mheemskerk@atlassian.com>
Mon, 29 Apr 2013 05:32:04 +0000 (22:32 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 29 Apr 2013 05:33:53 +0000 (22:33 -0700)
commitaf04fa2a78af3f4dc07bdc3e3018ccf3baa88c20
treeef98b2a7d158888c7c6681bb49bbb723265cf0aa
parentb75cdfaa882a00f2274e74b21c1a9927d184ed29
upload-pack: ignore 'shallow' lines with unknown obj-ids

When the client sends a 'shallow' line for an object that the server does
not have, the server currently dies with the error: "did not find object
for shallow <obj-id>".  The client may have truncated the history at
the commit by fetching shallowly from a different server, or the commit
may have been garbage collected by the server. In either case, this
unknown commit is not relevant for calculating the pack that is to be
sent and can be safely ignored, and it is not used when recomputing where
the updated history of the client is cauterised.

The documentation in technical/pack-protocol.txt has been updated to
remove the restriction that "Clients MUST NOT mention an obj-id which it
does not know exists on the server". This requirement is not realistic
because clients cannot know whether an object has been garbage collected
by the server.

Signed-off-by: Michael Heemskerk <mheemskerk@atlassian.com>
Reviewed-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/technical/pack-protocol.txt
upload-pack.c