Skip to content

Commit 916034b

Browse files
committed
Merge branch 'jc/maint-remove-renamed-ref' into maint
* jc/maint-remove-renamed-ref: branch -m/-M: remove undocumented RENAMED-REF Conflicts: refs.c
2 parents 1a61a9d + b0eab01 commit 916034b

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

refs.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,7 +1211,6 @@ int delete_ref(const char *refname, const unsigned char *sha1, int delopt)
12111211

12121212
int rename_ref(const char *oldref, const char *newref, const char *logmsg)
12131213
{
1214-
static const char renamed_ref[] = "RENAMED-REF";
12151214
unsigned char sha1[20], orig_sha1[20];
12161215
int flag = 0, logmoved = 0;
12171216
struct ref_lock *lock;
@@ -1235,13 +1234,6 @@ int rename_ref(const char *oldref, const char *newref, const char *logmsg)
12351234
if (!is_refname_available(newref, oldref, get_loose_refs(NULL), 0))
12361235
return 1;
12371236

1238-
lock = lock_ref_sha1_basic(renamed_ref, NULL, 0, NULL);
1239-
if (!lock)
1240-
return error("unable to lock %s", renamed_ref);
1241-
lock->force_write = 1;
1242-
if (write_ref_sha1(lock, orig_sha1, logmsg))
1243-
return error("unable to save current sha1 in %s", renamed_ref);
1244-
12451237
if (log && rename(git_path("logs/%s", oldref), git_path(TMP_RENAMED_LOG)))
12461238
return error("unable to move logfile logs/%s to "TMP_RENAMED_LOG": %s",
12471239
oldref, strerror(errno));

0 commit comments

Comments
 (0)