public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: "\"Peter Valdemar Mørch (Lists)\"" <4ux6as402@sneakemail•com>
To: git@vger•kernel.org
Subject: git log -Sfoo ignores indentation (whitespace?) changes...
Date: Tue, 03 Mar 2009 15:28:08 +0100	[thread overview]
Message-ID: <49AD3E78.1050706@sneakemail.com> (raw)

Commits where only the indentation of 'foo' is changed are not shown 
with "git log -Sfoo". Is there any way to force showing them along with 
other changes involving foo? (E.g. for python, indentation matters!)

Why doesn't the second commit show up in the following?

$ git init

# Create text containing 'line' without whitespace
$ echo 'line' > text
$ git add text
$ git commit -m "first" text

# Here, I add one space of indentation in front of 'line'
$ echo ' line' > text
$ git commit -m "second" text

# git log -Sline shows only the first commit, not the second,
# where the indentation changed.
$ git log -Sline
commit c4481e4b38bb521d91583e5c5a3b2b98f08b7ec0
Author: pvm <pvm@change_me•dk>
Date:   Tue Mar 3 14:45:38 2009 +0100

     first

# But clearly, the second commit *also* has changes
# containing 'line':
$ git log -p HEAD~..HEAD
commit 6cb883409aa9ccda00d7720ee9bf4fa59918c5fd
Author: pvm <pvm@change_me•dk>
Date:   Tue Mar 3 14:45:39 2009 +0100

     second

diff --git a/text b/text
index a999a0c..d650980 100644
--- a/text
+++ b/text
@@ -1 +1 @@
-line
+ line

I would like to see both "first" and "second" somehow - can I do that?

-- 
Peter Valdemar Mørch
http://www.morch.com

             reply	other threads:[~2009-03-03 14:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-03 14:28 "Peter Valdemar Mørch (Lists)" [this message]
2009-03-03 15:23 ` git log -Sfoo ignores indentation (whitespace?) changes Jeff King
2009-03-03 15:40   ` [PATCH] doc: clarify how -S works Jeff King
2009-03-03 16:12     ` John Tapsell
2009-03-03 16:19       ` Jeff King
2009-03-03 16:22         ` John Tapsell
2009-03-03 16:42     ` Junio C Hamano
2009-03-03 17:11       ` Jeff King
2009-03-03 17:39         ` John Tapsell
2009-03-03 17:57           ` Jeff King
2009-03-03 18:24           ` Junio C Hamano
2009-03-03 15:48   ` git log -Sfoo ignores indentation (whitespace?) changes "Peter Valdemar Mørch (Lists)"
2009-03-03 16:03     ` Jeff King
2009-03-03 16:21     ` Junio C Hamano
2009-03-03 16:02   ` Michael J Gruber
2009-03-03 16:25     ` Jeff King
2009-03-03 15:58 ` 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=49AD3E78.1050706@sneakemail.com \
    --to=4ux6as402@sneakemail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox