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

StGIT: "ghost" branch (unable to either create or delete)

From
ABAndrey Borzenkov <arvidjaar@mail.ru>
Date
Feb 15, 2010, 19:22 UTC
Message-ID
<201002152223.00871.arvidjaar@mail.ru>

{pts/1}% stg branch --delete --force tmp Deleting branch "tmp" ... stg branch: Branch "tmp" not initialised {pts/1}% stg branch --clone tmp Checking for changes in the working directory ... done Cloning current branch to "tmp" ... stg branch: tmp already initialized

I am not sure exactly how it happened. Using 0.14.3 and up-to-date GIY recently I started to get "git failed with code 128" for large number of operations. Apparently this resulted in sort of "ghost" branch that cannot be deleted but cannot be worked with either

{pts/1}% stg branch -c tmp
Checking for changes in the working directory ... done
Recording as a local branch                           
Branch "tmp" created                                  
{pts/1}% stg branch -l
Available branches:   
  s     initscripts  | 
  s     local-mdv    | 
        master       | 
        mdv          | 
> s     tmp          | 
{pts/1}% stg branch local-mdv
Checking for changes in the working directory ... done
Switching to branch "local-mdv" ... done              
{pts/1}% stg branch --delete tmp
Deleting branch "tmp" ...       
  stg branch: git failed with code 128
{pts/1}% stg branch -l          
Available branches:             
  s     initscripts  |          
> s     local-mdv    |          
        master       |          
        mdv          |          
{pts/1}% stg branch --clone tmp
Checking for changes in the working directory ... done
Cloning current branch to "tmp" ...                   
  stg branch: tmp already initialized                 
And now I have
{pts/1}% cat .git/config
[core]                  
        repositoryformatversion = 0
        filemode = true            
        bare = false               
        logallrefupdates = true    
[remote "origin"]                  
        fetch = +refs/heads/*:refs/remotes/origin/*
        url = ssh://git.mandriva.com/projects/networkmanager.git
[branch "master"]                                               
        remote = origin                                         
        merge = refs/heads/master                               
[branch "initscripts.stgit"]                                    
        parentbranch = mdv                                      
        stackformatversion = 2                                  
[branch "local-mdv.stgit"]                                      
        parentbranch = mdv                                      
        stackformatversion = 2                                  
[remote "upstream"]                                             
        url = 
git://anongit.freedesktop.org/NetworkManager/NetworkManager.git
        fetch = +refs/heads/*:refs/remotes/upstream/*                        
[branch "tmp.stgit"]                                                         
        parentbranch = local-mdv                                             
        stackformatversion = 2                                               

I would expect, stgit branch --delete --force to allow cleanups from such cases.

Message 1 of 1 in “StGIT: "ghost" branch (unable to either create or delete)”
  1. Andrey BorzenkovFeb 15, 2010

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.