aboutsummaryrefslogtreecommitdiff
path: root/cache-tree.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-01-10 22:49:35 -0800
committerJunio C Hamano <gitster@pobox.com>2008-02-05 00:39:19 -0800
commit45525bd022dda75ec935c9c579e452577dcfd31f (patch)
tree9928dc5906a9af8a7adbc54e6340cd4286ba3a1b /cache-tree.h
parent7a2078b4b00fb1c5d7b0bf8155778f79377b8f2f (diff)
downloadgit-45525bd022dda75ec935c9c579e452577dcfd31f.tar.gz
git-45525bd022dda75ec935c9c579e452577dcfd31f.tar.xz
Make error messages from cherry-pick/revert more sensible
The original "rewrite in C" did somewhat a sloppy job while stealing code from git-write-tree. The caller pretends as if the write_tree() function would return an error code and being able to issue a sensible error message itself, but write_tree() function just calls die() and never returns an error. Worse yet, the function claims that it was running git-write-tree (which is no longer true after cherry-pick stole it). Tested-by: Björn Steinbrink <B.Steinbrink@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache-tree.h')
-rw-r--r--cache-tree.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/cache-tree.h b/cache-tree.h
index 8243228e4..44aad426d 100644
--- a/cache-tree.h
+++ b/cache-tree.h
@@ -30,4 +30,9 @@ int cache_tree_update(struct cache_tree *, struct cache_entry **, int, int, int)
struct cache_tree *cache_tree_find(struct cache_tree *, const char *);
+#define WRITE_TREE_UNREADABLE_INDEX (-1)
+#define WRITE_TREE_UNMERGED_INDEX (-2)
+#define WRITE_TREE_PREFIX_ERROR (-3)
+
+int write_cache_as_tree(unsigned char *sha1, int missing_ok, const char *prefix);
#endif