# stgit: No patches to pop

6 messages from 2006-12-11 to 2006-12-12. Participants: Bahadir Balban, Catalin Marinas, Jakub Narebski.
Thread: https://gitlist.dev/t/43206

## Bahadir Balban, 2006-12-11 14:32

Subject: stgit: No patches to pop
Message-ID: <7ac1e90c0612110632x56a2917cu4db33e47923f34c2@mail.gmail.com>
URL: https://gitlist.dev/e/7ac1e90c0612110632x56a2917cu4db33e47923f34c2%40mail.gmail.com

```
Hi,

I've just recently started using stgit (v0.11, git v1.4.3.4). On a
test repository, I do:

% stg applied
first
second
third

but when I pop I get:

% stg pop
stg pop: No patches to pop

I also get things like:

% stg pop second
popping patch "third"... done
Now at patch "second"

Is this normal?

Thanks,

```

## Catalin Marinas, 2006-12-11 16:11

Subject: Re: stgit: No patches to pop
Message-ID: <tnxpsaqwgxl.fsf@arm.com>
URL: https://gitlist.dev/e/tnxpsaqwgxl.fsf%40arm.com
In-Reply-To: <7ac1e90c0612110632x56a2917cu4db33e47923f34c2@mail.gmail.com>

```
"Bahadir Balban" <bahadir.balban@gmail.com> wrote:
> I've just recently started using stgit (v0.11, git v1.4.3.4). On a
> test repository, I do:
>
> % stg applied
> first
> second
> third
>
> but when I pop I get:
>
> % stg pop
> stg pop: No patches to pop

Can you write a list of commands or script so that I can easily
reproduce this? It works OK for me.

> I also get things like:
>
> % stg pop second
> popping patch "third"... done
> Now at patch "second"

In version 0.11, the "pop" command is equivalent to "goto". I changed
this in the latest version (in the StGIT repository) so that "pop
<patch>" tries to only extract that patch from the stack by popping
all the patches to the given one and pushing them back without the one
you specified. It also supports patch ranges (i.e. patch1..patch4).

-- 

```

## Jakub Narebski, 2006-12-11 16:20

Subject: Re: stgit: No patches to pop
Message-ID: <elk0c3$ovu$1@sea.gmane.org>
URL: https://gitlist.dev/e/elk0c3%24ovu%241%40sea.gmane.org
In-Reply-To: <tnxpsaqwgxl.fsf@arm.com>

```
Catalin Marinas wrote:

>> I also get things like:
>>
>> % stg pop second
>> popping patch "third"... done
>> Now at patch "second"
> 
> In version 0.11, the "pop" command is equivalent to "goto". I changed
> this in the latest version (in the StGIT repository) so that "pop
> <patch>" tries to only extract that patch from the stack by popping
> all the patches to the given one and pushing them back without the one
> you specified. It also supports patch ranges (i.e. patch1..patch4).

That is kind of strange. Pop should work like pop does, for example
the one in Perl or Python, removing n elements from the stack of applied
patches. Not work as "float <patch>"...
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


```

## Bahadir Balban, 2006-12-11 17:05

Subject: Re: stgit: No patches to pop
Message-ID: <7ac1e90c0612110905x3f1632b9v17bb14e810715cbf@mail.gmail.com>
URL: https://gitlist.dev/e/7ac1e90c0612110905x3f1632b9v17bb14e810715cbf%40mail.gmail.com
In-Reply-To: <elk0c3$ovu$1@sea.gmane.org>

```
On 12/11/06, Jakub Narebski <jnareb@gmail.com> wrote:
> That is kind of strange. Pop should work like pop does, for example
> the one in Perl or Python, removing n elements from the stack of applied
> patches. Not work as "float <patch>"...
> --
> Jakub Narebski
> Warsaw, Poland
> ShadeHawk on #git

As a new user my first expectation was as Catalin has revised. If it's
going to stay as in 0.11 at least it would be nice to have it
described in the wiki.

Thanks,

```

## Jakub Narebski, 2006-12-11 22:54

Subject: Re: stgit: No patches to pop
Message-ID: <200612112354.53124.jnareb@gmail.com>
URL: https://gitlist.dev/e/200612112354.53124.jnareb%40gmail.com
In-Reply-To: <b0943d9e0612111426s3e0c671eqca31558e47d4348b@mail.gmail.com>

```
Catalin Marinas wrote:
> On 11/12/06, Jakub Narebski <jnareb@gmail.com> wrote:
>> Catalin Marinas wrote:
>>
>>>> I also get things like:
>>>>
>>>> % stg pop second
>>>> popping patch "third"... done
>>>> Now at patch "second"
>>>
>>> In version 0.11, the "pop" command is equivalent to "goto". I changed
>>> this in the latest version (in the StGIT repository) so that "pop
>>> <patch>" tries to only extract that patch from the stack by popping
>>> all the patches to the given one and pushing them back without the one
>>> you specified. It also supports patch ranges (i.e. patch1..patch4).
>>
>> That is kind of strange. Pop should work like pop does, for example
>> the one in Perl or Python, removing n elements from the stack of applied
>> patches. Not work as "float <patch>"...
> 
> Probably I wasn't clear enough. The "pop" operations are as follows:
> 
> 1. "stg pop" only removes the top patch from the applied patches
> 2. "stg pop <patch>.." is equivalent to popping all patches to <patch>
> (including the latter)
> 3. "stg pop <patch>" is equivalent to "stg float <patch>; stg pop".
> 4. "stg pop <patch list or range>" is equivalent to "stg float <patch
> list or range>; stg pop <all the patches in the list or range>"
> 
> These feature was Yann's idea and I find it to be more in line with
> the "push" command.

Nice, and easy to understand. By the way, the same works with "stg push",
doesn't it?

-- 
Jakub Narebski

```

## Catalin Marinas, 2006-12-12 09:10

Subject: Re: stgit: No patches to pop
Message-ID: <tnxlkldwkd3.fsf@arm.com>
URL: https://gitlist.dev/e/tnxlkldwkd3.fsf%40arm.com
In-Reply-To: <7ac1e90c0612110905x3f1632b9v17bb14e810715cbf@mail.gmail.com>

```
"Bahadir Balban" <bahadir.balban@gmail.com> wrote:
> On 12/11/06, Jakub Narebski <jnareb@gmail.com> wrote:
>> That is kind of strange. Pop should work like pop does, for example
>> the one in Perl or Python, removing n elements from the stack of applied
>> patches. Not work as "float <patch>"...
>> --
>> Jakub Narebski
>> Warsaw, Poland
>> ShadeHawk on #git
>
> As a new user my first expectation was as Catalin has revised. If it's
> going to stay as in 0.11 at least it would be nice to have it
> described in the wiki.

It was already modified in the StGIT repository and I am won't revert
it to the 0.11 functionality. Please feel free to modify the wiki
(which is really out of date - "stg help <command>" has more
up-to-date information).

-- 

```
