author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | |
Sat, 5 Feb 2011 10:52:21 +0000 (17:52 +0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 7 Feb 2011 23:05:25 +0000 (15:05 -0800) | ||
commit | c879daa23729547fb28aa7e8783c5e4e619a9e7c | |
tree | 0c73b7150204bf11f9ca90683b36e3229fb22279 | tree | snapshot |
parent | cf7b1cad0e8b024538de975dff5893262cec72d7 | commit | diff |
Make hash-object more robust against malformed objects
Commits, trees and tags have structure. Don't let users feed git
with malformed ones. Sooner or later git will die() when
encountering them.
Note that this patch does not check semantics. A tree that points
to non-existent objects is perfectly OK (and should be so, users
may choose to add commit first, then its associated tree for example).
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits, trees and tags have structure. Don't let users feed git
with malformed ones. Sooner or later git will die() when
encountering them.
Note that this patch does not check semantics. A tree that points
to non-existent objects is perfectly OK (and should be so, users
may choose to add commit first, then its associated tree for example).
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/hash-object.c | diff | blob | history | |
cache.h | diff | blob | history | |
read-cache.c | diff | blob | history | |
sha1_file.c | diff | blob | history | |
t/t1007-hash-object.sh | diff | blob | history |