# git gc error - cannot lock ref 'RENAMED-REF..1'

6 messages from 2010-04-01 to 2010-04-05. Participants: Eugene Sajine, Jeff King.
Thread: https://gitlist.dev/t/23287

## Eugene Sajine, 2010-04-01 17:37

Subject: git gc error - cannot lock ref 'RENAMED-REF..1'
Message-ID: <j2k76c5b8581004011037rb81d80cdu1a4713cde31d4b56@mail.gmail.com>
URL: https://gitlist.dev/e/j2k76c5b8581004011037rb81d80cdu1a4713cde31d4b56%40mail.gmail.com

```
I was running git gc weekly on my machine and today for some reason it
failed on one of my repos with an error saying

Error: cannot lock ref ‘RENAMED-REF..1’
Error: failed to run ref-log

The problem is I have no idea what it is talking about… “git show-ref”
doesn’t show anything even close to this name. Fools day joke?;)
Any advice?

Thanks in advance,
Eugene

```

## Eugene Sajine, 2010-04-02 02:08

Subject: git gc error - cannot lock ref 'RENAMED-REF..1'
Message-ID: <g2x76c5b8581004011908r35cbaf3au545b7f11bd6db8fc@mail.gmail.com>
URL: https://gitlist.dev/e/g2x76c5b8581004011908r35cbaf3au545b7f11bd6db8fc%40mail.gmail.com
In-Reply-To: <j2k76c5b8581004011037rb81d80cdu1a4713cde31d4b56@mail.gmail.com>

```
Hi,

I was running git gc weekly on my machine and today for some reason it
failed on one of my repos with an error saying

Error: cannot lock ref ‘RENAMED-REF..1’
Error: failed to run ref-log

The problem is I have no idea what it is talking about… “git show-ref”
doesn’t show anything even close to this name. Fools day joke?;)
Any advice?

Thanks in advance,
Eugene

```

## Eugene Sajine, 2010-04-03 03:38

Subject: Re: git gc error - cannot lock ref 'RENAMED-REF..1'
Message-ID: <u2s76c5b8581004022038rf8aa0017l5dea55689c738fd9@mail.gmail.com>
URL: https://gitlist.dev/e/u2s76c5b8581004022038rf8aa0017l5dea55689c738fd9%40mail.gmail.com
In-Reply-To: <g2x76c5b8581004011908r35cbaf3au545b7f11bd6db8fc@mail.gmail.com>

```
Hi,

Can, please, somebody advise what do i have to do in the situation
described below?

Thanks,
Eugene

On Thu, Apr 1, 2010 at 10:08 PM, Eugene Sajine <euguess@gmail.com> wrote:
> Hi,
>
> I was running git gc weekly on my machine and today for some reason it
> failed on one of my repos with an error saying
>
> Error: cannot lock ref ‘RENAMED-REF..1’
> Error: failed to run ref-log
>
> The problem is I have no idea what it is talking about… “git show-ref”
> doesn’t show anything even close to this name. Fools day joke?;)
> Any advice?
>
> Thanks in advance,
> Eugene
>

```

## Jeff King, 2010-04-03 04:22

Subject: Re: git gc error - cannot lock ref 'RENAMED-REF..1'
Message-ID: <20100403042211.GA22150@coredump.intra.peff.net>
URL: https://gitlist.dev/e/20100403042211.GA22150%40coredump.intra.peff.net
In-Reply-To: <u2s76c5b8581004022038rf8aa0017l5dea55689c738fd9@mail.gmail.com>

```
On Fri, Apr 02, 2010 at 11:38:03PM -0400, Eugene Sajine wrote:

> On Thu, Apr 1, 2010 at 10:08 PM, Eugene Sajine <euguess@gmail.com> wrote:
> > Hi,
> >
> > I was running git gc weekly on my machine and today for some reason it
> > failed on one of my repos with an error saying
> >
> > Error: cannot lock ref ‘RENAMED-REF..1’
> > Error: failed to run ref-log
> >
> > The problem is I have no idea what it is talking about… “git show-ref”
> > doesn’t show anything even close to this name. Fools day joke?;)
> > Any advice?

If you look in the .git directory, is there a file named RENAMED-REF..1?
I have no idea how you would create such a ref, nor why it would fail to
lock (perhaps because of the funny name?), but removing it should
probably clear up your problem at least.

The name "RENAMED-REF" is only used by git during ref renames, and those
only happen when renaming branches (via "git branch -m") or remotes (via
"git remote rename"). So presumably the source of the problem is related
to one of those operations.

-Peff

```

## Eugene Sajine, 2010-04-04 03:52

Subject: Re: git gc error - cannot lock ref 'RENAMED-REF..1'
Message-ID: <v2i76c5b8581004032052q950584e1y603319ec6f341542@mail.gmail.com>
URL: https://gitlist.dev/e/v2i76c5b8581004032052q950584e1y603319ec6f341542%40mail.gmail.com
In-Reply-To: <20100403042211.GA22150@coredump.intra.peff.net>

```
On Sat, Apr 3, 2010 at 12:22 AM, Jeff King <peff@peff.net> wrote:
> On Fri, Apr 02, 2010 at 11:38:03PM -0400, Eugene Sajine wrote:
>
>> On Thu, Apr 1, 2010 at 10:08 PM, Eugene Sajine <euguess@gmail.com> wrote:
>> > Hi,
>> >
>> > I was running git gc weekly on my machine and today for some reason it
>> > failed on one of my repos with an error saying
>> >
>> > Error: cannot lock ref ‘RENAMED-REF..1’
>> > Error: failed to run ref-log
>> >
>> > The problem is I have no idea what it is talking about… “git show-ref”
>> > doesn’t show anything even close to this name. Fools day joke?;)
>> > Any advice?
>
> If you look in the .git directory, is there a file named RENAMED-REF..1?
> I have no idea how you would create such a ref, nor why it would fail to
> lock (perhaps because of the funny name?), but removing it should
> probably clear up your problem at least.
>
> The name "RENAMED-REF" is only used by git during ref renames, and those
> only happen when renaming branches (via "git branch -m") or remotes (via
> "git remote rename"). So presumably the source of the problem is related
> to one of those operations.
>
> -Peff
>

Thanks Jeff,

i will take a look if i will be able to find this ref. The problem
though is that i don't remeber doing any renaming of branches or
remote in this repo. Probably somebody did and pushed it to the
mainline where i got it from by pull... I'll tyr to check this out.

Thanks,
Eugene

```

## Eugene Sajine, 2010-04-05 13:42

Subject: Re: git gc error - cannot lock ref 'RENAMED-REF..1'
Message-ID: <l2m76c5b8581004050642n2ea328f6wdbfbe3991a1f5e50@mail.gmail.com>
URL: https://gitlist.dev/e/l2m76c5b8581004050642n2ea328f6wdbfbe3991a1f5e50%40mail.gmail.com
In-Reply-To: <v2i76c5b8581004032052q950584e1y603319ec6f341542@mail.gmail.com>

```
>> If you look in the .git directory, is there a file named RENAMED-REF..1?
>> I have no idea how you would create such a ref, nor why it would fail to
>> lock (perhaps because of the funny name?), but removing it should
>> probably clear up your problem at least.
>>
>> The name "RENAMED-REF" is only used by git during ref renames, and those
>> only happen when renaming branches (via "git branch -m") or remotes (via
>> "git remote rename"). So presumably the source of the problem is related
>> to one of those operations.
>>
>> -Peff
>>
>
> Thanks Jeff,
>
> i will take a look if i will be able to find this ref. The problem
> though is that i don't remeber doing any renaming of branches or
> remote in this repo. Probably somebody did and pushed it to the
> mainline where i got it from by pull... I'll tyr to check this out.
>
> Thanks,
> Eugene
>

Well, I have removed the file "RENAMEDREF..1" and it didn't resolve
the problem. But then i made a "find -name REN*" and found another
instance in logs folder. Removing this actually resolved the problem
with gc. Still - i have no idea how this ref has appeared there as i
believe there was no renaming operations done as well as no manual
creation of such ref of course...

Thanks,
Eugene

```
