diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-10-18 07:19:01 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-10-18 07:19:01 +0200 |
commit | 16ba0f44c0cac7c06cf7ce37498b8c83e0f3b69b (patch) | |
tree | d139e7e06986cee72d0ab30fc758ab827770b283 /builtin | |
parent | Merge branch 'jk/describe-omit-some-refs' into maint (diff) | |
parent | cat-file: handle NULL object_context.path (diff) | |
download | git-16ba0f44c0cac7c06cf7ce37498b8c83e0f3b69b.tar.xz git-16ba0f44c0cac7c06cf7ce37498b8c83e0f3b69b.zip |
Merge branch 'jk/diff-blob' into maint
"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')
-rw-r--r-- | builtin/cat-file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/cat-file.c b/builtin/cat-file.c index 96b786e489..188ddc3e50 100644 --- a/builtin/cat-file.c +++ b/builtin/cat-file.c @@ -96,7 +96,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); @@ -106,7 +106,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); |