git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Corruption of branch?

From
TNThomas Nyberg <tomnyberg@gmail.com>
Date
Dec 14, 2015, 19:59 UTC
Message-ID
<566F1F96.4060806@gmail.com>
In-Reply-To
<1450120801.1678.13.camel@twopensource.com>

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:
Show 17 quoted lines
> 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.
>
Previous: David TurnerNext: Dennis Kaarsemaker
Message 5 of 10 in “Corruption of branch?”
  1. Thomas NybergDec 14, 2015
  2. Stefan BellerDec 14, 2015
  3. Thomas NybergDec 14, 2015
  4. David TurnerDec 14, 2015
  5. Thomas NybergDec 14, 2015
  6. Dennis KaarsemakerDec 14, 2015
  7. Thomas NybergDec 14, 2015
  8. Dennis KaarsemakerDec 14, 2015
  9. Junio C HamanoDec 14, 2015
  10. Thomas NybergDec 14, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.