summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-07-02 11:01:25 -0700
committerJunio C Hamano <gitster@pobox.com>2012-07-03 10:22:37 -0700
commit8c135ea260a84ef71899c8bd23bb39425288f9fe (patch)
treedbf61be43a0bb027ff1f02a5eea02e6f0bfc67fc /cache.h
parentf01cc14c3c70cfd820114505d2ddc153c28f6f89 (diff)
downloadgit-8c135ea260a84ef71899c8bd23bb39425288f9fe.tar.gz
sha1_name.c: get rid of get_sha1_with_mode_1()
The only external caller is setup.c that tries to give a nicer error message when an object name is misspelt (e.g. "HEAD:cashe.h"). Retire it and give the caller a dedicated and more intuitive API function maybe_die_on_misspelt_object_name(). Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/cache.h b/cache.h
index 9ee470ce12..beafa5b0c9 100644
--- a/cache.h
+++ b/cache.h
@@ -812,11 +812,8 @@ struct object_context {
};
extern int get_sha1(const char *str, unsigned char *sha1);
-extern int get_sha1_with_mode_1(const char *str, unsigned char *sha1, unsigned *mode, int only_to_die, const char *prefix);
-static inline int get_sha1_with_mode(const char *str, unsigned char *sha1, unsigned *mode)
-{
- return get_sha1_with_mode_1(str, sha1, mode, 0, NULL);
-}
+extern int get_sha1_with_mode(const char *str, unsigned char *sha1, unsigned *mode);
+extern void maybe_die_on_misspelt_object_name(const char *name, const char *prefix);
extern int get_sha1_with_context(const char *str, unsigned char *sha1, struct object_context *orc);
/*