git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Martin Langhoff <martin.langhoff@gmail.com>
Cc: "Paul Mackerras" <paulus@samba.org>,
	"Zbigniew Jędrzejewski-Szmek" <zbyszek@in.waw.pl>,
	"Martin Langhoff" <martin@laptop.org>,
	"Git Mailing List" <git@vger.kernel.org>,
	"Junio C Hamano" <gitster@pobox.com>
Subject: Re: [PATCH] gitk: add support for -G'regex' pickaxe variant
Date: Mon, 13 May 2013 11:55:51 -0700	[thread overview]
Message-ID: <20130513185551.GB3657@google.com> (raw)
In-Reply-To: <CACPiFCKkzSCaSfqExZggFHBAmcPBTYYhyauOa2h1dXiYqKZMxA@mail.gmail.com>

Martin Langhoff wrote:

> And to be honest, log -G is so much more useful that I don't care a
> s***t for log -S.

Fair enough. :)

[...]
> In other words: You find a suspicious-looking line of code and you ask
> "how did this horrid code come to be?", and the more horrendous the
> code is, the more likely it is to be the accretion of a several
> commits. In that case, which to me is the common case, log -S ain't
> your friend at all.

My experience is the opposite.  I wonder "What did the author of this
nonsense comment mean?" or "What is the purpose of this strange
condition in this if () statement?".  Then "git log -S" finds the
culprit without showing extraneous unrelated changes (such as
reindenting).  It is like "git blame", but for arbitrary chunks of
code instead of single lines.  Then, just like with "git blame", at
times the next step is to blame the parent and repeat the process
using the earlier form of the code in question.

It is especially handy for confusing code that spans multiple lines.
(Unfortunately that is not as easy to try in gitk.)

As I mentioned before, log -G and log -S are fairly dissimilar
operations.

Thanks,
Jonathan

  reply	other threads:[~2013-05-13 18:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-08  2:32 [PATCH] gitk: add support for -G'regex' pickaxe variant Martin Langhoff
2012-06-09  9:16 ` Zbigniew Jędrzejewski-Szmek
2012-06-10  6:37   ` Junio C Hamano
2012-06-10  7:24     ` Paul Mackerras
2012-06-10  7:31       ` Junio C Hamano
2012-06-14 18:34         ` Zbigniew Jędrzejewski-Szmek
2013-05-07 17:17           ` Martin Langhoff
2013-05-07 20:30             ` Felipe Contreras
2013-05-11  5:56             ` Paul Mackerras
2013-05-11  6:13               ` Jonathan Nieder
2013-05-11  9:41                 ` Paul Mackerras
2013-05-13 16:22                   ` Martin Langhoff
2013-05-13 18:55                     ` Jonathan Nieder [this message]
2013-05-13 19:19                       ` Martin Langhoff
2013-05-13 19:33                         ` Jonathan Nieder
2013-05-13 20:54                           ` Martin Langhoff
2013-05-13 21:52                             ` Junio C Hamano
2013-05-13 21:04                           ` Ramkumar Ramachandra
2013-05-13 21:38                             ` Jonathan Nieder
2013-05-13 18:52                   ` Jonathan Nieder

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130513185551.GB3657@google.com \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=martin.langhoff@gmail.com \
    --cc=martin@laptop.org \
    --cc=paulus@samba.org \
    --cc=zbyszek@in.waw.pl \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).