diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-11-08 16:35:53 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-11-08 16:35:53 -0800 |
commit | 916034b93ce45bdedfb1c5cef270e6eba2a26fea (patch) | |
tree | bb334bc156def237fa6e66f56009611aa095d450 | |
parent | 1a61a9dae874cac9ea40ac63f8fd662f62eee97e (diff) | |
parent | b0eab01a4824d9b6bcf23b51881fdc94ab3d38ec (diff) | |
download | git-916034b93ce45bdedfb1c5cef270e6eba2a26fea.tar.gz |
Merge branch 'jc/maint-remove-renamed-ref' into maint
* jc/maint-remove-renamed-ref:
branch -m/-M: remove undocumented RENAMED-REF
Conflicts:
refs.c
-rw-r--r-- | refs.c | 8 |
1 files changed, 0 insertions, 8 deletions
@@ -1211,7 +1211,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; @@ -1235,13 +1234,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)); |