* What changed in merge commit?
@ 2011-07-18 16:44 Patrick Doyle
2011-07-18 16:52 ` Erik Faye-Lund
2011-07-18 20:39 ` Andreas Schwab
0 siblings, 2 replies; 5+ messages in thread
From: Patrick Doyle @ 2011-07-18 16:44 UTC (permalink / raw)
To: git
Since today seems to be my day to hang out on this list, I thought I'd
ask another burning question...
How can I see what changed in a merge commit?
$ git log
just says "merge remote branch 'origin/master' into wpd" and
$ git log --name-status
says the same thing -- it doesn't list any files as having changed.
Perhaps nothing changed between the last time I merged with
origin/master and the current time. I know that at least one change
was committed. I suppose it's possible that two (or more) changes
were committed, undoing that one change. (But I don't think that's
likely).
I could go back and look at the log for origin/master... and I'm sure
there's some way to say "just give me the log of changes since the
last time I merged", or more to the point now, "just give me the log
of changes since the time before the last time I merged". It probably
has something to do with a couple of ref names, a caret, and some
dots, but I get lost in all of that syntax.
Thanks for the tips.
--wpd
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: What changed in merge commit?
2011-07-18 16:44 What changed in merge commit? Patrick Doyle
@ 2011-07-18 16:52 ` Erik Faye-Lund
2011-07-18 17:10 ` Christof Krüger
2011-07-18 20:39 ` Andreas Schwab
1 sibling, 1 reply; 5+ messages in thread
From: Erik Faye-Lund @ 2011-07-18 16:52 UTC (permalink / raw)
To: Patrick Doyle; +Cc: git
On Mon, Jul 18, 2011 at 6:44 PM, Patrick Doyle <wpdster@gmail.com> wrote:
> Since today seems to be my day to hang out on this list, I thought I'd
> ask another burning question...
>
> How can I see what changed in a merge commit?
>
> $ git log
>
> just says "merge remote branch 'origin/master' into wpd" and
>
> $ git log --name-status
>
> says the same thing -- it doesn't list any files as having changed.
That's because nothing did change; it's the merge's parents that are
the commits that changed something. If there was a fix-up (either due
to a merge-conflict or an explicitly squashed-in change), then that
would show up for the merge-commit.
You probably want to do something like "git diff SHA1-OF-MERGE^
SHA1-OF-MERGE" to see what the merge changed compared to it's previous
commit.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: What changed in merge commit?
2011-07-18 16:52 ` Erik Faye-Lund
@ 2011-07-18 17:10 ` Christof Krüger
2011-07-18 17:25 ` Patrick Doyle
0 siblings, 1 reply; 5+ messages in thread
From: Christof Krüger @ 2011-07-18 17:10 UTC (permalink / raw)
To: kusmabite; +Cc: Patrick Doyle, git
On Mo, 2011-07-18 at 18:52 +0200, Erik Faye-Lund wrote:
> You probably want to do something like "git diff SHA1-OF-MERGE^
> SHA1-OF-MERGE" to see what the merge changed compared to it's previous
> commit.
You could also use "git log --name-status -m" which will show multiple
entries for each parent of the merge commit.
See "man git-diff-tree" and look for the description of the options -m,
-c and --cc
Bye,
Chris
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: What changed in merge commit?
2011-07-18 17:10 ` Christof Krüger
@ 2011-07-18 17:25 ` Patrick Doyle
0 siblings, 0 replies; 5+ messages in thread
From: Patrick Doyle @ 2011-07-18 17:25 UTC (permalink / raw)
To: Christof Krüger; +Cc: kusmabite, git
2011/7/18 Christof Krüger <git@christof-krueger.de>:
> You could also use "git log --name-status -m" which will show multiple
> entries for each parent of the merge commit.
> See "man git-diff-tree" and look for the description of the options -m,
> -c and --cc
Thanks...
$ git log --name-status -m --first-parent
is what I was looking for. I thought I recalled there being something
like that, but could not recall nor find on the git-log man page the
"-m" option. Of course I can see it now :-)
Thanks for pointing me in the right direction.
--wpd
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: What changed in merge commit?
2011-07-18 16:44 What changed in merge commit? Patrick Doyle
2011-07-18 16:52 ` Erik Faye-Lund
@ 2011-07-18 20:39 ` Andreas Schwab
1 sibling, 0 replies; 5+ messages in thread
From: Andreas Schwab @ 2011-07-18 20:39 UTC (permalink / raw)
To: Patrick Doyle; +Cc: git
Patrick Doyle <wpdster@gmail.com> writes:
> How can I see what changed in a merge commit?
`git show -m' will show a diff for each parent. See "Diff Formatting" in
git-log(1).
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-07-18 20:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-18 16:44 What changed in merge commit? Patrick Doyle
2011-07-18 16:52 ` Erik Faye-Lund
2011-07-18 17:10 ` Christof Krüger
2011-07-18 17:25 ` Patrick Doyle
2011-07-18 20:39 ` Andreas Schwab
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.