threads / discuss / 10703

stgit: cleaning up after using git branch delete commands

Subject: stgit: cleaning up after using git branch delete commands

## tl;dr

5 messages between Nov 7, 2007 and Nov 8, 2007.

replies: 4people: 4as markdown or json

Jon Smirl· Nov 7, 2007, 14:06 UTC · lore

I've used git commands to delete several branches that had stgit active on it. Doing that has left a bunch of clutter in the .git directory. Is there a stgit command to remove all the clutter from branches that no longer exist? I'd like to use the branch names again but the clutter is interfering.

-- 
Jon Smirl
jonsmirl@gmail.com
Catalin Marinas· Nov 7, 2007, 14:57 UTC · re: Jon Smirl · lore

Re: stgit: cleaning up after using git branch delete commands

"Jon Smirl" <jonsmirl@gmail.com> wrote:
Show 5 quoted lines
> I've used git commands to delete several branches that had stgit
> active on it.  Doing that has left a bunch of clutter in the .git
> directory. Is there a stgit command to remove all the clutter from
> branches that no longer exist? I'd like to use the branch names again
> but the clutter is interfering.

You can create the branch back with GIT and run "stg branch --delete --force", though I don't guarantee it will work (BTW, I only recently relaxed the branch deletion rules in StGIT so that it doesn't complain of missing files and completes the operation, so you should use the latest HEAD).

-- 
Catalin
Jon Smirl· Nov 7, 2007, 16:11 UTC · re: Catalin Marinas · lore

Re: stgit: cleaning up after using git branch delete commands

On 11/7/07, Catalin Marinas <catalin.marinas@arm.com> wrote:
Show 12 quoted lines
> "Jon Smirl" <jonsmirl@gmail.com> wrote:
> > I've used git commands to delete several branches that had stgit
> > active on it.  Doing that has left a bunch of clutter in the .git
> > directory. Is there a stgit command to remove all the clutter from
> > branches that no longer exist? I'd like to use the branch names again
> > but the clutter is interfering.
>
> You can create the branch back with GIT and run "stg branch --delete
> --force", though I don't guarantee it will work (BTW, I only recently
> relaxed the branch deletion rules in StGIT so that it doesn't complain
> of missing files and completes the operation, so you should use the
> latest HEAD).
how about a 'stg gc' command that gets rid of all the inaccessible clutter?
>
> --
> Catalin
>
-- 
Jon Smirl
jonsmirl@gmail.com
Karl Hasselström· Nov 8, 2007, 05:53 UTC · re: Jon Smirl · lore

Re: stgit: cleaning up after using git branch delete commands

On 2007-11-07 11:11:42 -0500, Jon Smirl wrote:
> how about a 'stg gc' command that gets rid of all the inaccessible
> clutter?

"stg assimilate" already has the job of fixing up stuff after the user has used git commands to move HEAD around. I think it would make sense to teach it to do this too -- and then rename it "stg repair" or something. That way, there's one command to fix every kind of "damage" that git can do to stgit.

Alternatively, "stg branch --create" and "stg init" and whoever else is bothered by the clutter could simply remove it themselves. That would be even more user-friendly, I guess.

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Catalin Marinas· Nov 8, 2007, 09:18 UTC · re: Karl Hasselström · lore

Re: stgit: cleaning up after using git branch delete commands

On 08/11/2007, Karl Hasselström <kha@treskal.com> wrote:
Show 10 quoted lines
> On 2007-11-07 11:11:42 -0500, Jon Smirl wrote:
>
> > how about a 'stg gc' command that gets rid of all the inaccessible
> > clutter?
>
> "stg assimilate" already has the job of fixing up stuff after the user
> has used git commands to move HEAD around. I think it would make sense
> to teach it to do this too -- and then rename it "stg repair" or
> something. That way, there's one command to fix every kind of "damage"
> that git can do to stgit.

"repair" sounds better than "gc" (which might also be confused with the "git gc" command).

> Alternatively, "stg branch --create" and "stg init" and whoever else
> is bothered by the clutter could simply remove it themselves. That
> would be even more user-friendly, I guess.

I did some fixes for branch --delete but, since I use StGIT almost exclusively, haven't thought that we need to relax the branch creation as well.

-- 
Catalin

← back to recent threads