refs.c: Remove unused get_ref_sha1()
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Sixt committed
Nov 15, 2007 at 17:33 UTC
549799b4a1741fe765fff2c91808b4524ea2d7fb
2 files changed
-15
refs.c
-12
@@ -580,18 +580,6 @@ int for_each_remote_ref(each_ref_fn fn, void *cb_data)
580
return do_for_each_ref("refs/remotes/", fn, 13, cb_data);
581
}
582
583
-/* NEEDSWORK: This is only used by ssh-upload and it should go; the
584
- * caller should do resolve_ref or read_ref like everybody else. Or
585
- * maybe everybody else should use get_ref_sha1() instead of doing
586
- * read_ref().
587
- */
588
-int get_ref_sha1(const char *ref, unsigned char *sha1)
589
-{
590
- if (check_ref_format(ref))
591
- return -1;
592
- return read_ref(mkpath("refs/%s", ref), sha1);
593
-}
594
-
583
/*
584
* Make sure "ref" is something reasonable to have under ".git/refs/";
585
* We do not like it if:
refs.h
-3
@@ -26,9 +26,6 @@ extern int for_each_remote_ref(each_ref_fn, void *);
26
27
extern int peel_ref(const char *, unsigned char *);
28
29
-/** Reads the refs file specified into sha1 **/
30
-extern int get_ref_sha1(const char *ref, unsigned char *sha1);
31
-
29
/** Locks a "refs/" ref returning the lock on success and NULL on failure. **/
30
extern struct ref_lock *lock_ref_sha1(const char *ref, const unsigned char *old_sha1);
31