upload-pack: only accept commits from "shallow" line
commit6293ded348a918e5644d286dcd8b05044097c27d
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Tue, 8 Jan 2013 11:32:36 +0000 (8 18:32 +0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 8 Jan 2013 17:28:00 +0000 (8 09:28 -0800)
treec5e4b749f9bc8de68616d6aa29620127eba580e1
parent7e2010537e96d0a1144520222f20ba1dc3d61441
upload-pack: only accept commits from "shallow" line

We only allow cuts at commits, not arbitrary objects. upload-pack will
fail eventually in register_shallow if a non-commit is given with a
generic error "Object %s is a %s, not a commit". Check it early and
give a more accurate error.

This should never show up in an ordinary session. It's for buggy
clients, or when the user manually edits .git/shallow.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
upload-pack.c