summaryrefslogtreecommitdiff
path: root/builtin/prune.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-04-03 15:43:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-04-03 15:43:03 (GMT)
commitf1ad05f3a524a8750533d8263ceb584a9e7ec573 (patch)
tree9a7c452694f2718b34ddebf32aacf5a373203d5c /builtin/prune.c
parent8f780ca9be58d748c79e11b8dccad9474f4d1a19 (diff)
parentc29c46fa2e21e608ce2e603649af5bf38e7969c2 (diff)
downloadgit-f1ad05f3a524a8750533d8263ceb584a9e7ec573.zip
git-f1ad05f3a524a8750533d8263ceb584a9e7ec573.tar.gz
git-f1ad05f3a524a8750533d8263ceb584a9e7ec573.tar.bz2
Merge branch 'jk/fully-peeled-packed-ref' into maint-1.8.1
* jk/fully-peeled-packed-ref: pack-refs: add fully-peeled trait pack-refs: write peeled entry for non-tags use parse_object_or_die instead of die("bad object") avoid segfaults on parse_object failure
Diffstat (limited to 'builtin/prune.c')
-rw-r--r--builtin/prune.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/builtin/prune.c b/builtin/prune.c
index 8cb8b91..85843d4 100644
--- a/builtin/prune.c
+++ b/builtin/prune.c
@@ -149,9 +149,7 @@ int cmd_prune(int argc, const char **argv, const char *prefix)
const char *name = *argv++;
if (!get_sha1(name, sha1)) {
- struct object *object = parse_object(sha1);
- if (!object)
- die("bad object: %s", name);
+ struct object *object = parse_object_or_die(sha1, name);
add_pending_object(&revs, object, "");
}
else