# Editing patch sequences

3 messages from 2008-03-09 to 2008-03-16. Participants: Florian Weimer, Jakub Narebski.
Thread: https://gitlist.dev/t/12601

## Florian Weimer, 2008-03-09 09:30

Subject: Editing patch sequences
Message-ID: <877igcw8gn.fsf@mid.deneb.enyo.de>
URL: https://gitlist.dev/e/877igcw8gn.fsf%40mid.deneb.enyo.de

```
I've got a patch sequence (a list of file names of patches to apply to
some directory tree, not necessarily in quilt format), and I need to
reorder those patches (for instance, I've got a different version of the
directory tree, but don't want the patch at the beginning of the patch
sequence, but add the end).  If automatic reordering fails, I'd really
like to get some sort of three-way conflict.  After the editing process,
I want to get back another patch sequence, with as few as possible
differences to the original sequence (e.g., embedded file time stamps
should be kept the same, file headers should be preserved, and the order
of files in the patch should remain unchanged).

Has this already been implemented? "git rebase --interactive" comes
close, I think.  But minimizing the changes to individual patches seems
a bit of work.

It's not necessary that this integrates well with other GIT operations,
all this can happen on some throw-away branch or set of branches.

```

## Jakub Narebski, 2008-03-09 09:37

Subject: Re: Editing patch sequences
Message-ID: <m3myp8fdae.fsf@localhost.localdomain>
URL: https://gitlist.dev/e/m3myp8fdae.fsf%40localhost.localdomain
In-Reply-To: <877igcw8gn.fsf@mid.deneb.enyo.de>

```
Florian Weimer <fw@deneb.enyo.de> writes:

> I've got a patch sequence (a list of file names of patches to apply to
> some directory tree, not necessarily in quilt format), and I need to
> reorder those patches (for instance, I've got a different version of the
> directory tree, but don't want the patch at the beginning of the patch
> sequence, but add the end).
[...]

> Has this already been implemented? "git rebase --interactive" comes
> close, I think.  But minimizing the changes to individual patches seems
> a bit of work.

You can try to use one of two Git patch management interfaces: 
StGit or Guilt.
-- 
Jakub Narebski
Poland
ShadeHawk on #git

```

## Florian Weimer, 2008-03-16 11:02

Subject: Re: Editing patch sequences
Message-ID: <87r6eb0w4g.fsf@mid.deneb.enyo.de>
URL: https://gitlist.dev/e/87r6eb0w4g.fsf%40mid.deneb.enyo.de
In-Reply-To: <m3myp8fdae.fsf@localhost.localdomain>

```
* Jakub Narebski:

>> Has this already been implemented? "git rebase --interactive" comes
>> close, I think.  But minimizing the changes to individual patches seems
>> a bit of work.
>
> You can try to use one of two Git patch management interfaces: 
> StGit or Guilt.

I had missed that StGit has got three-way merge support.  Fortunately,
the need to manage patch sequences has gone away for the time being
(someone else did it for me 8-).  But I'll report back when the need
finally arises.  Thanks.

```
