git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [StGit PATCH] Convert "pop" to the lib infrastructure

From
CMCatalin Marinas <catalin.marinas@gmail.com>
Date
Apr 2, 2009, 16:20 UTC
Message-ID
<b0943d9e0904020920t1a5b87b3i6ac0b37fbcf2ec62@mail.gmail.com>
In-Reply-To
<20090401120515.GA30918@diana.vm.bytemark.co.uk>
2009/4/1 Karl Hasselström <kha@treskal.com>:
Show 22 quoted lines
> On 2009-03-31 12:30:27 +0100, Catalin Marinas wrote:
>
>> @@ -47,7 +47,7 @@ test_expect_success 'Try to reset with --hard' '
>>      stg reset --hard master.stgit^~1 &&
>>      stg status a > actual.txt &&
>>      test_cmp expected.txt actual.txt &&
>> -    test "$(echo $(stg series))" = "> p1 - p3 - p2"
>> +    test "$(echo $(stg series))" = "> p1 - p2 - p3"
>>  '
>
> Hmm, why this change in behavior? Something that should be noted in
> the commit message?
>
>> @@ -47,7 +47,7 @@ test_expect_success 'Try to undo with --hard' '
>>      stg undo --hard &&
>>      stg status a > actual.txt &&
>>      test_cmp expected.txt actual.txt &&
>> -    test "$(echo $(stg series))" = "> p1 - p3 - p2"
>> +    test "$(echo $(stg series))" = "> p1 - p2 - p3"
>>  '
>
> And I guess this is the same.

I think we now get a slightly different behaviour because of how the transactions are generated with the new infrastructure. In the above case, you have "pop p2 p3" and "push p3", the latter failing. The "pop p2 p3" command results in the stack being "> p1 - p2 - p3" while "push p3" performs a single step for pushing and reordering. The old push caused a reorder followed by a push.

So I think I should place the push changes before the pop ones so that pop itself doesn't fail.

I'll try to push them tonight as I'll go on holiday soon for two weeks.
-- 
Catalin
Previous: Karl HasselströmNext: Karl Hasselström
Message 3 of 4 in “Convert "pop" to the lib infrastructure”
  1. Convert "pop" to the lib infrastructureCatalin Marinas, Mar 31, 2009
  2. Karl HasselströmApr 1, 2009
  3. Catalin MarinasApr 2, 2009
  4. Karl HasselströmApr 3, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.