summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2007-02-28 01:38:31 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-02-28 05:37:46 (GMT)
commitfef742c4ed2be2b3b72f510314b7b2f3a7a7d0a7 (patch)
tree435b9d56777866a9b9be063b96ce1eaea21d6ca8 /cache.h
parent0ab179504a17907c395a4009f7c23d2f71bba1d3 (diff)
downloadgit-fef742c4ed2be2b3b72f510314b7b2f3a7a7d0a7.zip
git-fef742c4ed2be2b3b72f510314b7b2f3a7a7d0a7.tar.gz
git-fef742c4ed2be2b3b72f510314b7b2f3a7a7d0a7.tar.bz2
make sure enum object_type is signed
This allows for keeping the common idiom which consists of using negative values to signal error conditions by ensuring that the enum will be a signed type. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index 0117b7e..ec72c0c 100644
--- a/cache.h
+++ b/cache.h
@@ -263,6 +263,7 @@ int safe_create_leading_directories(char *path);
char *enter_repo(char *path, int strict);
enum object_type {
+ OBJ_BAD = -1,
OBJ_NONE = 0,
OBJ_COMMIT = 1,
OBJ_TREE = 2,
@@ -271,7 +272,7 @@ enum object_type {
/* 5 for future expansion */
OBJ_OFS_DELTA = 6,
OBJ_REF_DELTA = 7,
- OBJ_BAD,
+ OBJ_MAX,
};
/* Read and unpack a sha1 file into memory, write memory to a sha1 file */