Skip to content

Commit

Permalink
refs.c: Remove unused get_ref_sha1()
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Johannes Sixt authored and Junio C Hamano committed Nov 16, 2007
1 parent 039bc64 commit 549799b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
12 changes: 0 additions & 12 deletions refs.c
Original file line number Diff line number Diff line change
Expand Up @@ -580,18 +580,6 @@ int for_each_remote_ref(each_ref_fn fn, void *cb_data)
return do_for_each_ref("refs/remotes/", fn, 13, cb_data);
}

/* NEEDSWORK: This is only used by ssh-upload and it should go; the
* caller should do resolve_ref or read_ref like everybody else. Or
* maybe everybody else should use get_ref_sha1() instead of doing
* read_ref().
*/
int get_ref_sha1(const char *ref, unsigned char *sha1)
{
if (check_ref_format(ref))
return -1;
return read_ref(mkpath("refs/%s", ref), sha1);
}

/*
* Make sure "ref" is something reasonable to have under ".git/refs/";
* We do not like it if:
Expand Down
3 changes: 0 additions & 3 deletions refs.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ extern int for_each_remote_ref(each_ref_fn, void *);

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

/** Reads the refs file specified into sha1 **/
extern int get_ref_sha1(const char *ref, unsigned char *sha1);

/** Locks a "refs/" ref returning the lock on success and NULL on failure. **/
extern struct ref_lock *lock_ref_sha1(const char *ref, const unsigned char *old_sha1);

Expand Down

0 comments on commit 549799b

Please sign in to comment.