Op 21-3-2012 16:48, Vincent van Ravesteijn schreef:
Op 21-3-2012 16:39, Vincent van Ravesteijn schreef:
Op 21-3-2012 16:16, Pavel Sanda schreef:
Vincent van Ravesteijn wrote:
Op 21-3-2012 15:00, Pavel Sanda schreef:
Vincent van Ravesteijn wrote:
all commits that are in this range). If you want to see the code
changes
introduced by a merge you can do:
$ git diff 9236a938 9236a938^1
This will show you that the merge is not empty at all.
Is there a way how to obtain full listing of diffs which went into
the
master?
(I mean something like git log -p produced by git-svn on the old svn
trunk).
Something like this:
$ git log 9236a938^1..9236a938 --no-merges -p
you mean ?
Not at all. I want see all code changes which went into the master.
Lets say I know there existed patch which I'm able to grep for (eg.
I can remember particular code change or string change, whatsoever).
When using git-svn I simply typed:
git log -p
and I got full listing of trunk history which I could grep as much
as I want (or with combination with -S).
Now with the merging commit of Richard the real code change
disappeared from the listing, but I want to see it as well
(and all other merges in history like this one).
How?
"git log -p" really shows all commits that went into master. The
problem is that by using "git log" you're forcing the history to be
linear, while it actually isn't. Git therefore sorts the commit based
on the date of the commit (not the date of the merge). So, the date
of the actual code change that was merged in by Richard was March 13.
You can see this immediately if you limit the output to only
Richard's commits:
$ git log -p --author='Richard Heck'
Vincent
The following shows the diffs in order they got into master:
or:
git log -p -m --first-parent
-m
This flag makes the merge commits show the full diff like regular
commits; for each merge parent, a separate log entry and diff is
generated. An exception is that only diff against the first parent
is shown when /--first-parent/ option is given; in that case, the
output represents the changes the merge brought /into/ the
then-current branch.
Vincent