Re: generating combined diff without an existing merge commit
On Fri, Oct 21, 2016 at 3:41 PM, Junio C Hamano wrote: > Jacob Keller writes: > >> Turns out that somehow I must have messed up my command because "git >> diff " does indeed do exactly what I >> want. > > Thanks. I was wondering why it didn't work for you, as the feature > was done exactly to support that use case ;-) I'm not really sure. It kept spitting out usage information to me, but then I tried again with a fresh example and it worked as expected. Thanks, Jake
Re: generating combined diff without an existing merge commit
Jacob Keller writes: > Turns out that somehow I must have messed up my command because "git > diff " does indeed do exactly what I > want. Thanks. I was wondering why it didn't work for you, as the feature was done exactly to support that use case ;-)
Re: generating combined diff without an existing merge commit
On Fri, Oct 21, 2016 at 2:40 PM, Jacob Keller wrote: > Hi, > > I recently determined that I can produce an interdiff for a series > that handles rebasing nicely and shows the conflicts resolved when > rebasing plus any other changes. > > The basic idea is something like the following, assuming that v1 is a > tag that points to the first version, v2 is a tag that points to the > rebased new version, and base is a tag that points to the new base of > the series (ie: the upstream if the v2 is on a branch and has been > fully rebased) > > git checkout v1 > git merge base > #perform any further edits to get everything looking like v2 > git commit > git show -cc HEAD > > This is also equivalent to the following without having to actually do > the merge manually: > > git commit-tree v2^{head} -p v1 -p master -m "some merge message" > git show > this nicely shows us the combined diff format which correctly shows > any conflicts required to fix up during the rebase (which we already > did because we have v2) and it also shows any *other* changes caused > by v2 but without showing changes which we didn't actually make. (I > think?) > > The result is that we can nicely see what was required to produce v2 > from v1 but without being cluttered by what changed in base. > > However, I have to actually generate the commit to do this. I am > wondering if it is possible today to actually just do something like: > > git diffand get the result that I want? > > I've already started digging to see if I can do that but haven't found > anything yet. > > Thanks, > Jake Turns out that somehow I must have messed up my command because "git diff " does indeed do exactly what I want. Thanks, Jake
generating combined diff without an existing merge commit
Hi, I recently determined that I can produce an interdiff for a series that handles rebasing nicely and shows the conflicts resolved when rebasing plus any other changes. The basic idea is something like the following, assuming that v1 is a tag that points to the first version, v2 is a tag that points to the rebased new version, and base is a tag that points to the new base of the series (ie: the upstream if the v2 is on a branch and has been fully rebased) git checkout v1 git merge base #perform any further edits to get everything looking like v2 git commit git show -cc HEAD This is also equivalent to the following without having to actually do the merge manually: git commit-tree v2^{head} -p v1 -p master -m "some merge message" git showand get the result that I want? I've already started digging to see if I can do that but haven't found anything yet. Thanks, Jake