threads / discuss / 23287

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

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

## tl;dr

6 messages between Apr 1, 2010 and Apr 5, 2010.

replies: 5people: 2as markdown or json

Eugene Sajine· Apr 1, 2010, 17:37 UTC · lore

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· Apr 2, 2010, 02:08 UTC · re: Eugene Sajine · lore
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· Apr 3, 2010, 03:38 UTC · re: Eugene Sajine · lore

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

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:
Show 15 quoted lines
> 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· Apr 3, 2010, 04:22 UTC · re: Eugene Sajine · lore

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

On Fri, Apr 02, 2010 at 11:38:03PM -0400, Eugene Sajine wrote:
Show 12 quoted lines
> 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· Apr 4, 2010, 03:52 UTC · re: Jeff King · lore

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

On Sat, Apr 3, 2010 at 12:22 AM, Jeff King <peff@peff.net> wrote:
Show 27 quoted lines
> 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· Apr 5, 2010, 13:42 UTC · re: Eugene Sajine · lore

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

Show 23 quoted lines
>> 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

← back to recent threads