git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git log -Sfoo ignores indentation (whitespace?) changes...
@ 2009-03-03 14:28 "Peter Valdemar Mørch (Lists)"
  2009-03-03 15:23 ` Jeff King
  2009-03-03 15:58 ` Junio C Hamano
  0 siblings, 2 replies; 17+ messages in thread
From: "Peter Valdemar Mørch (Lists)" @ 2009-03-03 14:28 UTC (permalink / raw)
  To: git

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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2009-03-03 18:26 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-03 14:28 git log -Sfoo ignores indentation (whitespace?) changes "Peter Valdemar Mørch (Lists)"
2009-03-03 15:23 ` 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

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 NNTP newsgroup(s).