threads / discuss / 5343

stgit: deleting a branch doesn't seem to work

Subject: stgit: deleting a branch doesn't seem to work

## tl;dr

4 messages between Aug 21, 2006 and Aug 23, 2006.

replies: 3people: 3as markdown or json

Torgil Svensson· Aug 21, 2006, 17:27 UTC · lore
I have three branches and want my "gst10" to be "master" instead
$ stg branch --delete master
Deleting branch "master"... done
$ stg branch -l
Available branches:
  s     gst10   |
        master  |
>       origin  |

$ stg branch --delete master Deleting branch "master"... done $ stg branch -r gst10 master stg branch: Branch "master" already exists

Is there something i'm missing in my logic?
//Torgil
Catalin Marinas· Aug 22, 2006, 08:34 UTC · re: Torgil Svensson · lore

Re: stgit: deleting a branch doesn't seem to work

"Torgil Svensson" <torgil.svensson@gmail.com> wrote:
Show 15 quoted lines
> I have three branches and want my "gst10" to be "master" instead
>
> $ stg branch --delete master
> Deleting branch "master"... done
> $ stg branch -l
> Available branches:
>   s     gst10   |
>         master  |
>>       origin  |
> $ stg branch --delete master
> Deleting branch "master"... done
> $ stg branch -r gst10 master
> stg branch: Branch "master" already exists
>
> Is there something i'm missing in my logic?

It's not actually documented but it looks like the master branch is not completely deleted by StGIT. If you have StGIT-managed patches in "master", they are removed but the GIT branch is kept as this is usually the default branch.

You could do a "git branch -d master" but maybe I should change StGIT to fully delete the "master" branch as well.

-- 
Catalin
Torgil Svensson· Aug 22, 2006, 17:12 UTC · re: Catalin Marinas · lore

Re: stgit: deleting a branch doesn't seem to work

Which option you choose doesn't really matter to me, I easily deleted the master-branch (with rm). If you choose to stay with the current situation the message should be changed to something like "stgit patches succesfully deleted from branch xxx" and "branch xxx is not controlled by stgit, nothing is done."

It also would be helpful to new users if "stg refresh -e" is mentioned in the tutorial. Refresh isn't obvious to test if you want to edit description.

Otherwise I had no problem in my first stgit experience. I first took a chance that "stgit import" recognized patches saved by "format-patch", but this was easily solved with "stg refresh -e" once I found it (thanks #git).

I've never worked with quilt before so i'm new to this style of development. My experiece so far is that I find stgit to be very useful. Thanks!

//Torgil
On 8/22/06, Catalin Marinas <catalin.marinas@arm.com> wrote:
Show 28 quoted lines
> "Torgil Svensson" <torgil.svensson@gmail.com> wrote:
> > I have three branches and want my "gst10" to be "master" instead
> >
> > $ stg branch --delete master
> > Deleting branch "master"... done
> > $ stg branch -l
> > Available branches:
> >   s     gst10   |
> >         master  |
> >>       origin  |
> > $ stg branch --delete master
> > Deleting branch "master"... done
> > $ stg branch -r gst10 master
> > stg branch: Branch "master" already exists
> >
> > Is there something i'm missing in my logic?
>
> It's not actually documented but it looks like the master branch is
> not completely deleted by StGIT. If you have StGIT-managed patches in
> "master", they are removed but the GIT branch is kept as this is
> usually the default branch.
>
> You could do a "git branch -d master" but maybe I should change StGIT
> to fully delete the "master" branch as well.
>
> --
> Catalin
>
Catalin Marinas· Aug 23, 2006, 09:15 UTC · re: Torgil Svensson · lore

Re: stgit: deleting a branch doesn't seem to work

On 22/08/06, Torgil Svensson <torgil.svensson@gmail.com> wrote:
> Otherwise I had no problem in my first stgit experience. I first took
> a chance that "stgit import" recognized patches saved by
> "format-patch", but this was easily solved with "stg refresh -e" once
> I found it (thanks #git).

You could also use git-apply which understands the output of format-patch and change the commits into StGIT patches with "stg uncommit" (use the latest stgit snapshot as it has some bug-fixes and can automatically generate the patch name from the commit subject line).

The tutorial is pretty old and doesn't cover all the commands and options.
-- 
Catalin

← back to recent threads