{"thread":{"id":"10889","subject":"[PATCH] refs.c: Remove unused get_ref_sha1()","startedAt":"2007-11-15T16:33:44Z","lastAt":"2007-11-15T16:33:44Z","messageCount":1,"participants":["Johannes Sixt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"59997","messageId":"1195144424-2991-1-git-send-email-johannes.sixt@telecom.at","threadId":"10889","inReplyTo":null,"subject":"[PATCH] refs.c: Remove unused get_ref_sha1()","fromName":"Johannes Sixt","fromEmail":"johannes.sixt@telecom.at","sentAt":"2007-11-15T16:33:44Z","receivedAt":"2007-11-15T16:33:44Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>\n---\n refs.c |   12 ------------\n refs.h |    3 ---\n 2 files changed, 0 insertions(+), 15 deletions(-)\n\ndiff --git a/refs.c b/refs.c\nindex aff02cd..ae53254 100644\n--- a/refs.c\n+++ b/refs.c\n@@ -580,18 +580,6 @@ int for_each_remote_ref(each_ref_fn fn, void *cb_data)\n \treturn do_for_each_ref(\"refs/remotes/\", fn, 13, cb_data);\n }\n \n-/* NEEDSWORK: This is only used by ssh-upload and it should go; the\n- * caller should do resolve_ref or read_ref like everybody else.  Or\n- * maybe everybody else should use get_ref_sha1() instead of doing\n- * read_ref().\n- */\n-int get_ref_sha1(const char *ref, unsigned char *sha1)\n-{\n-\tif (check_ref_format(ref))\n-\t\treturn -1;\n-\treturn read_ref(mkpath(\"refs/%s\", ref), sha1);\n-}\n-\n /*\n  * Make sure \"ref\" is something reasonable to have under \".git/refs/\";\n  * We do not like it if:\ndiff --git a/refs.h b/refs.h\nindex 6eb98a4..9dc8aa0 100644\n--- a/refs.h\n+++ b/refs.h\n@@ -26,9 +26,6 @@ extern int for_each_remote_ref(each_ref_fn, void *);\n \n extern int peel_ref(const char *, unsigned char *);\n \n-/** Reads the refs file specified into sha1 **/\n-extern int get_ref_sha1(const char *ref, unsigned char *sha1);\n-\n /** Locks a \"refs/\" ref returning the lock on success and NULL on failure. **/\n extern struct ref_lock *lock_ref_sha1(const char *ref, const unsigned char *old_sha1);\n \n-- \n1.5.3.5.578.g1f8ec\n"}]}