Skip to content

Commit 549799b

Browse files
Johannes Sixtgitster
authored andcommitted
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>
1 parent 039bc64 commit 549799b

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

refs.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -580,18 +580,6 @@ int for_each_remote_ref(each_ref_fn fn, void *cb_data)
580580
return do_for_each_ref("refs/remotes/", fn, 13, cb_data);
581581
}
582582

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-
595583
/*
596584
* Make sure "ref" is something reasonable to have under ".git/refs/";
597585
* We do not like it if:

refs.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ extern int for_each_remote_ref(each_ref_fn, void *);
2626

2727
extern int peel_ref(const char *, unsigned char *);
2828

29-
/** Reads the refs file specified into sha1 **/
30-
extern int get_ref_sha1(const char *ref, unsigned char *sha1);
31-
3229
/** Locks a "refs/" ref returning the lock on success and NULL on failure. **/
3330
extern struct ref_lock *lock_ref_sha1(const char *ref, const unsigned char *old_sha1);
3431

0 commit comments

Comments
 (0)