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

Re: Corruption of branch?

From
Stefan Beller <sbeller@google.com>
Date
Dec 14, 2015, 17:51 UTC
Message-ID
<CAGZ79kaUw8Hb_7hdAUbvmnmXvm3a-77j5t3zeyQ-7BqwPCSp+A@mail.gmail.com>
In-Reply-To
<566EFF11.6010600@gmail.com>
On Mon, Dec 14, 2015 at 9:40 AM, Thomas Nyberg <tomnyberg@gmail.com> wrote:
Show 14 quoted lines
> Hello,
>
> I have a repository (which I unfortunately cannot provide access to) which
> is having some odd things happening with one (and only one) of its branches.
> This workflow repeats the issue (here `bad_branch` is one of the remotes
> branches; i.e. `origin/bad_branch`):
>
> (1) clone the repository
> (2) git checkout `bad_branch`
>
> Basically nothing happens. Nothing is printed and I stay on the master
> branch. I also checked $? and there is no error code that is set. If I
> choose any of other branches, it correctly creates a local branch, sets it
> to track the remote and then switches to the local branch.

Does that branch have a funny name? (i.e. is it ASCII only? Or is it also utf8 characters? Does it have some special characters in it like points, colons, question marks etc)

Does it happen only with a single sha1 or can you apply commits on top of that branch and the error condition persists?

Show 18 quoted lines
>
> It seems like there could be some sort of weird bug in the checkout or
> possibly somehow some corruption in the actual object tree. From my vantage
> point, however, the data appears totally fine. For example, in
> `.git/packed-refs` everything appears normal and if I explicitly checkout
> the commit IDs directly (i.e. just copy the commit corresponding to
> refs/remotes/origin/bad_branch and checkout $commit) it checks out fine. If
> I do this with the bad_branch I get a detached HEAD as expected and git log
> lists the commits that it should.
>
> This seems a bit odd to me. There's certainly some sort of error somewhere,
> but it's passing silently. I'm not really sure how to debug this and it's
> too bad I can't actually link the actual repository. I presume if I have the
> time I could try compiling git from source and seeing if it still shows up.
> I tested it on the following two versions of git get the same error:
>
> * 1.9.1 (installed as a package from Linux Mint 17.2 Rafaela)
> * 2.1.4 (installed as a package from Debian Jessie 8.2)

The refs handling code is in flux at the moment. (starting mid of last year actually) I cc'd people who did work recently on the file refs.c

So I think trying with a new version of Git would be a valuable datapoint!
Show 12 quoted lines
>
> Also I should note that the original repository is hosted on Github.
>
> Thanks for any help. Hopefully the fact that I can't provide enough
> information for others to reproduce the issue isn't too large a bother...
>
> Cheers,
> Thomas Nyberg
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: Thomas NybergNext: Thomas Nyberg
Message 2 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.