projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'ew/pretty-fmt'
[git.git]
/
tar-tree.c
diff --git
a/tar-tree.c
b/tar-tree.c
index
bd289a9
..
3308736
100644
(file)
--- a/
tar-tree.c
+++ b/
tar-tree.c
@@
-321,8
+321,8
@@
int main(int argc, char **argv)
strbuf_append_string(¤t_path, "/");
/* FALLTHROUGH */
case 2:
strbuf_append_string(¤t_path, "/");
/* FALLTHROUGH */
case 2:
- if (get_sha1(argv[1], sha1)
< 0
)
-
usage(tar_tree_usage
);
+ if (get_sha1(argv[1], sha1))
+
die("Not a valid object name %s", argv[1]
);
break;
default:
usage(tar_tree_usage);
break;
default:
usage(tar_tree_usage);
@@
-335,7
+335,7
@@
int main(int argc, char **argv)
} else
archive_time = time(NULL);
} else
archive_time = time(NULL);
- tree.buf = read_object_with_reference(sha1,
"tree"
, &tree.size,
+ tree.buf = read_object_with_reference(sha1,
tree_type
, &tree.size,
tree_sha1);
if (!tree.buf)
die("not a reference to a tag, commit or tree object: %s",
tree_sha1);
if (!tree.buf)
die("not a reference to a tag, commit or tree object: %s",