aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-04-03 09:18:01 -0700
committerJunio C Hamano <gitster@pobox.com>2013-04-03 09:18:01 -0700
commit92e0d916326de103e463f9ffcfcd99ec1f3a9dc0 (patch)
tree91c7fc235e4d52169b13602eeedbc9c42b407440 /builtin
parent40a0f842daca9ebcb0e0f286b9af74c05ae4a1ae (diff)
parent072dda68eafdefe56f9305c547771367353cf89d (diff)
downloadgit-92e0d916326de103e463f9ffcfcd99ec1f3a9dc0.tar.gz
git-92e0d916326de103e463f9ffcfcd99ec1f3a9dc0.tar.xz
Sync with 1.8.1 maintenance track
* maint-1.8.1: Start preparing for 1.8.1.6 git-tag(1): we tag HEAD by default Fix revision walk for commits with the same dates t2003: work around path mangling issue on Windows 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 entry: fix filter lookup t2003: modernize style name-hash.c: fix endless loop with core.ignorecase=true
Diffstat (limited to 'builtin')
-rw-r--r--builtin/grep.c4
-rw-r--r--builtin/prune.c4
2 files changed, 2 insertions, 6 deletions
diff --git a/builtin/grep.c b/builtin/grep.c
index 802596498..159e65d47 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -820,9 +820,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
unsigned char sha1[20];
/* Is it a rev? */
if (!get_sha1(arg, sha1)) {
- struct object *object = parse_object(sha1);
- if (!object)
- die(_("bad object %s"), arg);
+ struct object *object = parse_object_or_die(sha1, arg);
if (!seen_dashdash)
verify_non_filename(prefix, arg);
add_object_array(object, arg, &list);
diff --git a/builtin/prune.c b/builtin/prune.c
index 8cb8b9186..85843d4f1 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