Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'nd/upload-pack-shallow-must-be-commit'
author
Junio C Hamano
<gitster@pobox.com>
Mon, 14 Jan 2013 16:15:44 +0000
(08:15 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 14 Jan 2013 16:15:44 +0000
(08:15 -0800)
A minor consistency check patch that does not have much relevance
to the real world.
* nd/upload-pack-shallow-must-be-commit:
upload-pack: only accept commits from "shallow" line
upload-pack.c
patch
|
blob
|
history
raw
(from parent 1:
0a9a787
)
diff --git
a/upload-pack.c
b/upload-pack.c
index 6142421ea1172f7fe6b57486a4f41b81d92bab85..95d83135ae95b2fa7980c69cbd7b49e3a6ff2d0a 100644
(file)
--- a/
upload-pack.c
+++ b/
upload-pack.c
@@
-603,6
+603,8
@@
static void receive_needs(void)
object = parse_object(sha1);
if (!object)
die("did not find object for %s", line);
+ if (object->type != OBJ_COMMIT)
+ die("invalid shallow object %s", sha1_to_hex(sha1));
object->flags |= CLIENT_SHALLOW;
add_object_array(object, NULL, &shallows);
continue;