summaryrefslogtreecommitdiff
path: root/builtin/cat-file.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-09-28 14:47:53 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-09-28 14:47:53 +0900
commitbfbc2fccfdff0fe189337de67e16fc132b8ee2a5 (patch)
treef08bb74506c440a64267b43675cdfcc4311fd345 /builtin/cat-file.c
parentMerge branch 'hn/typofix' (diff)
parentcat-file: handle NULL object_context.path (diff)
downloadtgif-bfbc2fccfdff0fe189337de67e16fc132b8ee2a5.tar.xz
Merge branch 'jk/diff-blob'
"git cat-file --textconv" started segfaulting recently, which has been corrected. * jk/diff-blob: cat-file: handle NULL object_context.path
Diffstat (limited to 'builtin/cat-file.c')
-rw-r--r--builtin/cat-file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/cat-file.c b/builtin/cat-file.c
index 4ccbfaac31..1ea25331d3 100644
--- a/builtin/cat-file.c
+++ b/builtin/cat-file.c
@@ -97,7 +97,7 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name,
return !has_object_file(&oid);
case 'w':
- if (!path[0])
+ if (!path)
die("git cat-file --filters %s: <object> must be "
"<sha1:path>", obj_name);
@@ -107,7 +107,7 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name,
break;
case 'c':
- if (!path[0])
+ if (!path)
die("git cat-file --textconv %s: <object> must be <sha1:path>",
obj_name);