summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2011-10-21 16:04:34 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-10-21 16:04:34 -0700
commite3353046eeb1df8eafdb76efd62407fec070bce5 (patch)
tree1230424614c7bf19997846706bf630661bb5055e /refs.c
parentMerge branch 'pw/p4-update' (diff)
parentbranch -m/-M: remove undocumented RENAMED-REF (diff)
downloadtgif-e3353046eeb1df8eafdb76efd62407fec070bce5.tar.xz
Merge branch 'jc/maint-remove-renamed-ref'
* jc/maint-remove-renamed-ref: branch -m/-M: remove undocumented RENAMED-REF Conflicts: refs.c
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/refs.c b/refs.c
index cab4394ad1..2496d4093e 100644
--- a/refs.c
+++ b/refs.c
@@ -1254,7 +1254,6 @@ int delete_ref(const char *refname, const unsigned char *sha1, int delopt)
int rename_ref(const char *oldref, const char *newref, const char *logmsg)
{
- static const char renamed_ref[] = "RENAMED-REF";
unsigned char sha1[20], orig_sha1[20];
int flag = 0, logmoved = 0;
struct ref_lock *lock;
@@ -1278,13 +1277,6 @@ int rename_ref(const char *oldref, const char *newref, const char *logmsg)
if (!is_refname_available(newref, oldref, get_loose_refs(NULL), 0))
return 1;
- lock = lock_ref_sha1_basic(renamed_ref, NULL, 0, NULL);
- if (!lock)
- return error("unable to lock %s", renamed_ref);
- lock->force_write = 1;
- if (write_ref_sha1(lock, orig_sha1, logmsg))
- return error("unable to save current sha1 in %s", renamed_ref);
-
if (log && rename(git_path("logs/%s", oldref), git_path(TMP_RENAMED_LOG)))
return error("unable to move logfile logs/%s to "TMP_RENAMED_LOG": %s",
oldref, strerror(errno));