Subject: Re: Corruption of branch?

From: Thomas Nyberg <[email-masked]>
Date: Mon, 14 Dec 2015 14:59:18 -0500

In the .git/config there is no [branch "frus"] section. At first this is 
expected (i.e. cleaning cloning), but nothing changes when I execute 
`git checkout frus`. When I execute `git checkout frus_body_cleaning` 
that gets added to .git/config as expected.

.git/refs/heads contains two files "master" and "frus_body_cleaning" 
pointing to their respective commits, but there is nothing else there. 
here's the other command

$ grep frus packed-refs
3a1dbe48299f6eda1cc4b69cab35284c0f0355eb refs/remotes/origin/frus
1750cba5a94b3fe6041aaf49de430a558a3b9bc8 
refs/remotes/origin/frus_body_cleaning

So here frus actually is showing up. The find command isn't working 
either. I changed it to add the * but only shows the frus_body_cleaning 
branch:

$ find .git -name 'frus*'
.git/logs/refs/heads/frus_body_cleaning
.git/refs/heads/frus_body_cleaning

So yeah this is pretty weird. I'm guessing you're looking for name 
collisions of some kind? I had the idea that the problem might that too 
and used git show-index to look for all objects, but none of them have 
frus in them (I thought that maybe if the sha of one of them started 
with "frus" that would explain it but no dice). Since the command `git 
checkout -b frus origin/frus` works, it seems to me like somehow git is 
getting confused going from the `git checkout frus` command to that 
expanded one.

It is pretty baffling.

On 12/14/2015 02:20 PM, David Turner wrote:
> On Mon, 2015-12-14 at 13:08 -0500, Thomas Nyberg wrote:
>> Hi Stefan thanks for much for the response! So I compiled release
>> version 2.6.4 as well as the current master branch on the git git
>> repository (2.7.0.rc0.20.g4b9ab0e) and the problem persists on both.
>>
>> To answer your questions, there are no weird characters. The name of the
>> bad_branch is "frus". There is another branch called
>> "frus_body_cleaning" that is totally fine.
>
> What's in .git/config under [branch "frus"] (if anything)?
>
> What does "grep refs/heads/frus .git/packed-refs" say?  What about
> find .git -name frus ?
>
> Sorry for the possibly-stupid questions, but I'm really baffled by this
> one.
>