git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Catalin Marinas" <catalin.marinas@gmail.com>
To: "Karl Hasselström" <kha@treskal.com>
Cc: git@vger.kernel.org, "Jon Smirl" <jonsmirl@gmail.com>
Subject: Re: [StGit PATCH] Test that we can add a new file to a non-topmost patch with refresh -p
Date: Mon, 21 Jul 2008 23:01:17 +0100	[thread overview]
Message-ID: <b0943d9e0807211501g68d1cffeh12bcb34df0f28dae@mail.gmail.com> (raw)
In-Reply-To: <20080718180109.GA14825@diana.vm.bytemark.co.uk>

2008/7/18 Karl Hasselström <kha@treskal.com>:
> On 2008-07-18 19:03:06 +0200, Karl Hasselström wrote:
>
>> We currently can't -- this is bug 12038, found by Jon Smirl. See
>>
>>   https://gna.org/bugs/index.php?12038
>
> OK, the problem is that to pop the patches on top of the one we are to
> refresh, we call pop_patch(keep = True). This in turn calls
> git.switch(keep = True), which resets the index (but is careful to not
> touch the worktree).

Yes.

> I'm not quite sure how to fix this in a simple way -- the code simply
> assumes that the index contains nothing of interest. And since I
> already have a rewrite of refresh that handles this and a handful of
> other cases that the old code does not, I'm kind of disinclined to
> undertake a larger restructuring of the code.
>
> Catalin, what do you think?

I don't think we should spend time on fixing the current code as you
already have a new implementation. Maybe we could add a simple test
and refuse refreshing other than the topmost patch in case of files
added to the index.

-- 
Catalin

  parent reply	other threads:[~2008-07-21 22:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-18  1:29 stgit: bug with refresh and -p Jon Smirl
2008-07-18  8:41 ` Karl Hasselström
2008-07-18 17:03   ` [StGit PATCH] Test that we can add a new file to a non-topmost patch with refresh -p Karl Hasselström
2008-07-18 18:01     ` Karl Hasselström
2008-07-18 17:45       ` Jon Smirl
2008-07-18 19:16         ` Karl Hasselström
2008-07-21 22:01       ` Catalin Marinas [this message]
2008-07-22  7:14         ` Karl Hasselström
2008-07-25 21:37           ` Catalin Marinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b0943d9e0807211501g68d1cffeh12bcb34df0f28dae@mail.gmail.com \
    --to=catalin.marinas@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jonsmirl@gmail.com \
    --cc=kha@treskal.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).