threads / discuss / 22663

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

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

## tl;dr

One message between Feb 15, 2010 and Feb 15, 2010.

replies: 0people: 1as markdown or json

Andrey Borzenkov· Feb 15, 2010, 19:22 UTC · lore

{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.

← back to recent threads