Re: Am able to delete a file with no trace in the log
- From
Jeff King <peff@peff.net>
- Date
- Jun 3, 2009, 23:06 UTC
- Message-ID
- <20090603230606.GA5462@coredump.intra.peff.net>
- In-Reply-To
- <alpine.LFD.2.01.0906031547480.4880@localhost.localdomain>
On Wed, Jun 03, 2009 at 03:56:01PM -0700, Linus Torvalds wrote:
Show 7 quoted lines
> > Is there a way to say "show me everything that touched x, _including_ > > merges"? > > Well, that's the "--simplify-merges" part. > > It's just that our diff generation isn't very smart. We do show the > commit, we just don't show a meaningful diff in that case.
No, --simplify-merges doesn't show the merge, unless I am doing something very wrong. Try (and this is a simplified version of the original example):
mkdir repo && cd repo && git init && echo content >base && git add base && git commit -m base && echo context >a.txt && git add a.txt && git commit -m 'master 1' && git checkout -b other HEAD^ && echo content >b.txt && git add b.txt && git commit -m 'other 1' && echo conflict >a.txt && git add a.txt && git commit -m 'other 2' && git checkout master && git merge other ;# conflicts
rm b.txt && git add b.txt && echo resolve >a.txt && git add a.txt && git commit -m merged
Now try running git log on that. I can see the merge diff if I use "-m", which is obviously too verbose, but at least works. But if I give "b.txt" as a path limiter, I can't get the merge commit to display at all. Doing "git log -m --simplify-merges --stat -- b.txt" yields only the commit "other 1" in which b.txt was added.
-Peff