From: "Catalin Marinas" <catalin.marinas@gmail.com>
To: "Yann Dirson" <ydirson@altern.org>
Cc: "GIT list" <git@vger.kernel.org>
Subject: Re: [PATCH 0/4] Series short description
Date: Fri, 24 Nov 2006 15:37:31 +0000 [thread overview]
Message-ID: <b0943d9e0611240737h572bc5f8g3e9b34edf22fe1a5@mail.gmail.com> (raw)
In-Reply-To: <20061123230721.9769.38403.stgit@gandelf.nowhere.earth>
On 23/11/06, Yann Dirson <ydirson@altern.org> wrote:
> The following adds a --patch flag to "stg refresh". I mainly needed it to
> edit the log message in patches down the stack, but with some work it could
> be used to record changes in another file and come back.
>
> That would require to pop patches with --keep,
pop_patches(keep=True) allows this (I already added it to your patch).
This option actually applies the reverse of the patch between the
current index and the bottom of the last patch to be popped. If it
fails, it doesn't affect the current tree and reports an error.
> and if we ask to only record
> a subset of the changes, we would need to implement "push --keep" first.
The "push --keep" is a bit more complicated to implement since it
would usually have to generate commits (pop doesn't need to) since
usually the base of the pushed patches might have changed (especially
with the refresh --patch). It is even more complicated if the changes
you want to preserve affect a file modified by the pushed patches.
A solution I see is to generate a temporary diff, push the patches you
want and fold this temporary diff (the diff can be temporarily written
to a local file so that you don't lose them in case of an error or
Ctrl-C). If the push fails (conflicts) or the diff no longer applies,
just undo the push and re-apply the diff. There is no way to simply
check whether all the patches apply (git-apply --check) since you
can't generate a single diff for all the pushed patches (which might
not be in the committed order).
--
prev parent reply other threads:[~2006-11-24 15:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-23 23:16 [PATCH 0/4] Series short description Yann Dirson
2006-11-23 23:16 ` [PATCH 1/4] Make Series::patch_applied public Yann Dirson
2006-11-23 23:16 ` [PATCH 2/4] Allows to refresh a non-top applied patch Yann Dirson
2006-11-23 23:17 ` [PATCH 3/4] Optimize stg goto in the pop case Yann Dirson
2006-11-23 23:17 ` [PATCH 4/4] Bomb out when --ack and --sign are both passed to "refresh" Yann Dirson
2006-11-24 15:37 ` Catalin Marinas [this message]
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=b0943d9e0611240737h572bc5f8g3e9b34edf22fe1a5@mail.gmail.com \
--to=catalin.marinas@gmail.com \
--cc=git@vger.kernel.org \
--cc=ydirson@altern.org \
/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).