<div dir="ltr">Hello,<div><br></div><div>Simon, I wouldn't worry about my branch---my changes are fairly orthogonal, so it shouldn't be too hard for me to the same sort of operation on top of `master`, once your changes are in there.</div><div><br></div><div>-Iavor</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 16, 2014 at 2:24 AM, Joachim Breitner <span dir="ltr"><<a href="mailto:mail@joachim-breitner.de" target="_blank">mail@joachim-breitner.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
<br>
Am Donnerstag, den 16.10.2014, 08:08 +0000 schrieb Simon Peyton Jones:<br>
<span class="">> I’d like to completely re-organise the patches before committing to<br>
> HEAD.  How do I do that?  Some kind of rebase?   Clearly I want to<br>
> start from current HEAD, rather than having weird merge patches<br>
> involved.<br>
><br>
> I was thinking of starting a new branch and doing a manual diff/patch,<br>
> but that seems crude.<br>
<br>
</span>Not too crude, if your new set of (logically interesting) patches is<br>
going to be completely different from your original set of (historically<br>
grown) patches.<br>
<br>
Here is one workflow for that:<br>
(aren’t you glad that you get so many different suggestions :-)<br>
<br>
$ git checkout master<br>
<br>
# We first create a branch that contains the final state of the files<br>
# that you will like to push<br>
$ git checkout -b tmp-merge-branch<br>
$ git merge wip/new-flatten-skolems-Aug14<br>
# resolve your conflicts here, once<br>
<br>
# now you have a branch with your desired final state, but a messy<br>
# history. We now create multiple nice patches from that state that,<br>
# together, yield the same result:<br>
$ git checkout master<br>
$ git checkout --patch tmp-merge-branch<br>
# now you can interactively select portions from your patch. Select<br>
# those that you want in your first polished commit<br>
$ emacs .... # do any additional cleanup of this commit, if required<br>
$ git commit -a -m 'First patch'<br>
$ git checkout --checkout tmp-merge-branch<br>
# Select parts for the second commit<br>
$ emacs .... # do any additional cleanup of this commit, if required<br>
$ git commit -a -m 'Second patch'<br>
... repeat ...<br>
# (in the final "git checkout --patch", you should have selected all<br>
# changes)<br>
<br>
# now master is identical to tmp-merge-branch, check this using<br>
$ git diff master..tmp-merge-branch<br>
$ git branch -D tmp-merge-branch<br>
$ git push origin master<br>
<br>
<br>
<br>
Greetings,<br>
Joachim<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
Joachim “nomeata” Breitner<br>
  <a href="mailto:mail@joachim-breitner.de">mail@joachim-breitner.de</a> • <a href="http://www.joachim-breitner.de/" target="_blank">http://www.joachim-breitner.de/</a><br>
  Jabber: <a href="mailto:nomeata@joachim-breitner.de">nomeata@joachim-breitner.de</a>  • GPG-Key: 0xF0FBF51F<br>
  Debian Developer: <a href="mailto:nomeata@debian.org">nomeata@debian.org</a><br>
<br>
</font></span><br>_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/ghc-devs" target="_blank">http://www.haskell.org/mailman/listinfo/ghc-devs</a><br>
<br></blockquote></div><br></div>