Re: [PATCH 0/4] Series short description

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23/11/06, Yann Dirson <ydirson@xxxxxxxxxx> 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).

--
Catalin
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]