From: Jonathan Nieder <jrnieder@gmail.com>
To: Miklos Vajna <vmiklos@collabora.co.uk>
Cc: git@vger.kernel.org
Subject: Re: git log history simplification problem
Date: Tue, 4 Feb 2014 11:48:42 -0800 [thread overview]
Message-ID: <20140204194842.GM30398@google.com> (raw)
In-Reply-To: <20140204173713.GC17861@collabora.co.uk>
Hi,
Miklos Vajna wrote:
> git clone git://anongit.freedesktop.org/libreoffice/core
> cd core
> git log --full-history -p -S'mnTitleBarHeight =' sd/source/ui/dlg/PaneDockingWindow.cxx
>
> Here the first output I get from git-log is
> b390fae1706b9c511158a03e4fd61f263be4e511, where you can see that the
> commit *added* that string. So it should be there on master, I would
> assume.
df76bfb0695d19d201936df80192108e7ce51b8c (a merge) removed it.
Plain 'git log' doesn't notice because in the default mode it skips
merges.
Since the culprit commit is not in the first-parent history of HEAD,
my usual approach doesn't help, either:
$ git log -m --first-parent -S'mnTitleBarHeight =' \
-- sd/source/ui/dlg/PaneDockingWindow.cxx
$
Using -c or --cc produces too many hits.
Luckily '-m -p' without --first-parent worked and the first commit it
showed was the right one. It produces more hits than I'd like, too,
though.
The -L option doesn't interact well enough with --reverse to handle
this case:
$ git grep -p -e'mnTitleBarHeight =' b390fae1 -- sd/source/ui/dlg/PaneDockingWindow.cxx
b390fae1:sd/source/ui/dlg/PaneDockingWindow.cxx=void PaneDockingWindow::Layout (void)
b390fae1:sd/source/ui/dlg/PaneDockingWindow.cxx: mnTitleBarHeight = GetSettings().GetStyleSettings().GetTitleHeight();
b390fae1:sd/source/ui/dlg/PaneDockingWindow.cxx: mnTitleBarHeight = aToolBoxSize.Height();
b390fae1:sd/source/ui/dlg/PaneDockingWindow.cxx: mnTitleBarHeight = aToolBoxSize.Height();
$ git log --reverse b390fae1..HEAD \
-L:Layout:sd/source/ui/dlg/PaneDockingWindow.cxx
fatal: -L parameter 'Layout' starting at line 1: no match
Thanks for a useful example.
Jonathan
next prev parent reply other threads:[~2014-02-04 19:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-04 17:37 git log history simplification problem Miklos Vajna
2014-02-04 19:05 ` Miklos Vajna
2014-02-04 19:48 ` Jonathan Nieder [this message]
2014-02-04 20:07 ` Miklos Vajna
2014-02-04 20:11 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140204194842.GM30398@google.com \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=vmiklos@collabora.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.