summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonnie Sahlberg <sahlberg@google.com>2014-07-23 10:03:54 -0700
committerJunio C Hamano <gitster@pobox.com>2014-09-03 10:15:51 -0700
commita53b672d4a82e4edaa61359eb5a8893c0d03ffe1 (patch)
treefc5797600c9b021f4be5fdfd69ce2c9bf7ce4602
parent803d0f856443f728a93d55e58f092484153b019c (diff)
downloadgit-a53b672d4a82e4edaa61359eb5a8893c0d03ffe1.tar.gz
refs.c: remove lock_any_ref_for_update
No one is using this function so we can delete it. Signed-off-by: Ronnie Sahlberg <sahlberg@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--refs.c7
-rw-r--r--refs.h9
2 files changed, 1 insertions, 15 deletions
diff --git a/refs.c b/refs.c
index 58e2a566cb..91cf672225 100644
--- a/refs.c
+++ b/refs.c
@@ -2225,13 +2225,6 @@ static struct ref_lock *lock_ref_sha1_basic(const char *refname,
return NULL;
}
-struct ref_lock *lock_any_ref_for_update(const char *refname,
- const unsigned char *old_sha1,
- int flags, int *type_p)
-{
- return lock_ref_sha1_basic(refname, old_sha1, flags, type_p, NULL, 0);
-}
-
/*
* Write an entry to the packed-refs file for the specified refname.
* If peeled is non-NULL, write it as the entry's peeled value.
diff --git a/refs.h b/refs.h
index d23a18647c..712fc32668 100644
--- a/refs.h
+++ b/refs.h
@@ -171,20 +171,13 @@ extern int ref_exists(const char *);
extern int peel_ref(const char *refname, unsigned char *sha1);
/*
- * Flags controlling lock_any_ref_for_update(), transaction_update_sha1(),
- * transaction_create_sha1(), etc.
+ * Flags controlling transaction_update_sha1(), transaction_create_sha1(), etc.
* REF_NODEREF: act on the ref directly, instead of dereferencing
* symbolic references.
*
* Flags >= 0x100 are reserved for internal use.
*/
#define REF_NODEREF 0x01
-/*
- * This function sets errno to something meaningful on failure.
- */
-extern struct ref_lock *lock_any_ref_for_update(const char *refname,
- const unsigned char *old_sha1,
- int flags, int *type_p);
/** Reads log for the value of ref during at_time. **/
extern int read_ref_at(const char *refname, unsigned long at_time, int cnt,