Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Make trailing LF optional for all fast-import commands
[gitweb.git]
/
builtin-write-tree.c
diff --git
a/builtin-write-tree.c
b/builtin-write-tree.c
index 391de53972ebf77d2e08f1b405969e065bd8b371..88f34ba7d6e2426fae5169eb28b12e93e72082eb 100644
(file)
--- a/
builtin-write-tree.c
+++ b/
builtin-write-tree.c
@@
-52,6
+52,8
@@
int write_tree(unsigned char *sha1, int missing_ok, const char *prefix)
if (prefix) {
struct cache_tree *subtree =
cache_tree_find(active_cache_tree, prefix);
+ if (!subtree)
+ die("git-write-tree: prefix %s not found", prefix);
hashcpy(sha1, subtree->sha1);
}
else