Re: [RFC/PATCH] replace: add --graft option

2014-05-19 Thread Michael Haggerty
On 05/18/2014 08:29 PM, Christian Couder wrote: The usage string for this option is: git replace [-f] --graft commit [parent...] First we create a new commit that is the same as commit except that its parents are [parents...] Then we create a replace ref that replace commit with the

Re: [RFC/PATCH] replace: add --graft option

2014-05-19 Thread Jeff King
On Mon, May 19, 2014 at 11:42:07AM +0200, Michael Haggerty wrote: On 05/18/2014 08:29 PM, Christian Couder wrote: The usage string for this option is: git replace [-f] --graft commit [parent...] First we create a new commit that is the same as commit except that its parents are

Re: [RFC/PATCH] replace: add --graft option

2014-05-19 Thread Junio C Hamano
Jeff King p...@peff.net writes: It might make sense to just teach parse_commit_header to be a little more thorough; it has to read past those lines anyway to find the author and committer lines, so it would not be much more expensive to note them. And then of course the code needs to be

Re: [RFC/PATCH] replace: add --graft option

2014-05-19 Thread Jeff King
On Mon, May 19, 2014 at 10:25:10AM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: It might make sense to just teach parse_commit_header to be a little more thorough; it has to read past those lines anyway to find the author and committer lines, so it would not be much more

Re: [RFC/PATCH] replace: add --graft option

2014-05-19 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Mon, May 19, 2014 at 10:25:10AM -0700, Junio C Hamano wrote: The headers up to committer are cast in stone in their ordering, and I do not immediately see how loosening it would be beneficial. Unless you are trying to give users a new way to record

[RFC/PATCH] replace: add --graft option

2014-05-18 Thread Christian Couder
The usage string for this option is: git replace [-f] --graft commit [parent...] First we create a new commit that is the same as commit except that its parents are [parents...] Then we create a replace ref that replace commit with the commit we just created. With this new option, it should be