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

Re: Problem switching branches in submodule

From
MGManish Gill <mgill25@outlook.com>
Date
Sep 26, 2013, 19:29 UTC
Message-ID
<BLU0-SMTP2754312DA341C7F3254F325B8280@phx.gbl>
In-Reply-To
<20130926184830.GG9464@google.com>
On 09/27/2013 12:18 AM, Jonathan Nieder wrote:
Show 9 quoted lines
> Manish Gill wrote:
>> Jonathan Nieder wrote:
> 
>>> What is the exact command you use to get the above output?
>>
>> git checkout <branch_name>
> 
> Is <branch_name> a normal branch, a remote-tracking branch, or a
> branch that doesn't exist yet?
Local branch that was supposed to track a remote branch.
Show 14 quoted lines
> 
> [...]
>> I should mention what *exactly* happened that led to this. I was trying
>> to publish my branch on Launchpad (using git-remote-bzr). At some point,
>> I had the genius idea to remote the extra stuff from the config file and
>> just try with the bzr:: remote as origin, and instead of doing it via
>> the console, I just replaced the config file.
>>
>> Annnnyway, I just restored my backed up config file for that submodule
>> in the middle of writing this and seems like things seem to work now.
> 
> If you happen to have a copy of the old config file or remember what it
> said, that could be helpful (especially if you can still reproduce the
> problem in case we come up with a fix).

Config file which was NOT working: http://bpaste.net/show/oaWG3TQarH3BrdjDj5be/

Working config restored from backup: http://bpaste.net/show/nF3ap5fDEAwL9NyqdCmD/

> 
> Did the config file have a [core] worktree setting or something similar?

Looks like the working one had it and the other didn't. Adding the "worktree" setting seems to fix the problem. But shouldn't this work uniformly in the repo? Removing the [core] worktree gives the same error, but only in directories inside the repo. Checkout still works on the top-level. Seems a bit strange I guess.

> 
> Hmm,
> Jonathan
> 
Previous: Jonathan NiederNext: Duy Nguyen
Message 5 of 6 in “Problem switching branches in submodule”
  1. Manish GillSep 26, 2013
  2. Jonathan NiederSep 26, 2013
  3. Manish GillSep 26, 2013
  4. Jonathan NiederSep 26, 2013
  5. Manish GillSep 26, 2013
  6. Duy NguyenSep 26, 2013

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.