Skip to content

Commit e335304

Browse files
committed
Merge branch 'jc/maint-remove-renamed-ref'
* jc/maint-remove-renamed-ref: branch -m/-M: remove undocumented RENAMED-REF Conflicts: refs.c
2 parents 5a4fcc2 + b0eab01 commit e335304

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
@@ -1254,7 +1254,6 @@ int delete_ref(const char *refname, const unsigned char *sha1, int delopt)
12541254

12551255
int rename_ref(const char *oldref, const char *newref, const char *logmsg)
12561256
{
1257-
static const char renamed_ref[] = "RENAMED-REF";
12581257
unsigned char sha1[20], orig_sha1[20];
12591258
int flag = 0, logmoved = 0;
12601259
struct ref_lock *lock;
@@ -1278,13 +1277,6 @@ int rename_ref(const char *oldref, const char *newref, const char *logmsg)
12781277
if (!is_refname_available(newref, oldref, get_loose_refs(NULL), 0))
12791278
return 1;
12801279

1281-
lock = lock_ref_sha1_basic(renamed_ref, NULL, 0, NULL);
1282-
if (!lock)
1283-
return error("unable to lock %s", renamed_ref);
1284-
lock->force_write = 1;
1285-
if (write_ref_sha1(lock, orig_sha1, logmsg))
1286-
return error("unable to save current sha1 in %s", renamed_ref);
1287-
12881280
if (log && rename(git_path("logs/%s", oldref), git_path(TMP_RENAMED_LOG)))
12891281
return error("unable to move logfile logs/%s to "TMP_RENAMED_LOG": %s",
12901282
oldref, strerror(errno));

0 commit comments

Comments
 (0)