# stgit: premerge hooks and preventing errors

2 messages from 2008-01-24 to 2008-01-25. Participants: Jon Smirl, Karl Hasselström.
Thread: https://gitlist.dev/t/11727

## Jon Smirl, 2008-01-24 20:32

Subject: stgit: premerge hooks and preventing errors
Message-ID: <9e4733910801241232j58974193i5ec0a618376c2415@mail.gmail.com>
URL: https://gitlist.dev/e/9e4733910801241232j58974193i5ec0a618376c2415%40mail.gmail.com

```
What's the status of using premerge hooks to stop git merge/pull from
messing up stgit? I just messed up another stgit tree by doing git
pull on it. I've learned how to fix this by rolling back the head, but
this mistake is way too easy to make.

Even though I'm aware that this mistake is possible and I'm still
making it. When you have a mix of git and stgit trees it is very easy
to forget which one you are on.

-- 
Jon Smirl
jonsmirl@gmail.com

```

## Karl Hasselström, 2008-01-25 08:43

Subject: Re: stgit: premerge hooks and preventing errors
Message-ID: <20080125084328.GB5804@diana.vm.bytemark.co.uk>
URL: https://gitlist.dev/e/20080125084328.GB5804%40diana.vm.bytemark.co.uk
In-Reply-To: <9e4733910801241232j58974193i5ec0a618376c2415@mail.gmail.com>

```
On 2008-01-24 15:32:40 -0500, Jon Smirl wrote:

> What's the status of using premerge hooks to stop git merge/pull
> from messing up stgit? I just messed up another stgit tree by doing
> git pull on it. I've learned how to fix this by rolling back the
> head, but this mistake is way too easy to make.

I decided that while such hooks would be useful, it'd be even more
useful to have "stg undo" which could undo every kind of mistake,
including this one -- so I decided to build "stg undo" first. And I
still haven't quite started. :-) I do have the design more or less
finished, though.

> Even though I'm aware that this mistake is possible and I'm still
> making it. When you have a mix of git and stgit trees it is very
> easy to forget which one you are on.

Very true.

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle

```
