All of lore.kernel.org
 help / color / mirror / Atom feed
* git diff vs git diff-files
@ 2012-08-13  8:55 Bernd Jendrissek
  2012-08-13 15:02 ` Thomas Rast
  2012-08-13 15:13 ` Matthieu Moy
  0 siblings, 2 replies; 9+ messages in thread
From: Bernd Jendrissek @ 2012-08-13  8:55 UTC (permalink / raw)
  To: git

I have a billion testsuite golden output files that have changed due
to an explicit ordering of objects I've imposed on output. A helper
script I wrote to help parse the diffs (to ignore order-only
differences) noticed that one hunk had a different number of additions
and deletions. I'm manually copying and pasting the hunks from git add
-i into the script. However, when I used git diff to get at the
changes, to discover which line was the offending one, all additions
and deletions were exactly matched!

With strace I noticed that git add -i calls git diff-files, and that's
about as far as I can conveniently trace where things are going weird.
Weird:

$ /usr/local/git/bin/git diff-files -p --color -- TwoStageAmp-output.net
diff --git a/gnetlist/tests/common/outputs/osmond/TwoStageAmp-output.net
b/gnetlist/tests/common/outputs/osmond/TwoStageAmp-output.net
index a5ee1e7..a9f3620 100644
--- a/gnetlist/tests/common/outputs/osmond/TwoStageAmp-output.net
+++ b/gnetlist/tests/common/outputs/osmond/TwoStageAmp-output.net
@@ -1,47 +1,47 @@
-Part unknown { Name Cout }
-Part unknown { Name R5 }
-Part unknown { Name R4 }
-Part unknown { Name RE2 }
-Part unknown { Name Q2 }
+Part unknown { Name R8 }
 Part unknown { Name A3 }
-Part unknown { Name R3 }
 Part unknown { Name A2 }
-Part unknown { Name RE1 }
 Part unknown { Name A1 }
[snip]

$ /usr/local/git/bin/git diff TwoStageAmp-output.netdiff --git
a/gnetlist/tests/common/outputs/osmond/TwoStageAmp-output.net
b/gnetlist/tests/common/outputs/osmond/TwoStageAmp-output.n
index a5ee1e7..a9f3620 100644
--- a/gnetlist/tests/common/outputs/osmond/TwoStageAmp-output.net
+++ b/gnetlist/tests/common/outputs/osmond/TwoStageAmp-output.net
@@ -1,47 +1,47 @@
-Part unknown { Name Cout }
-Part unknown { Name R5 }
-Part unknown { Name R4 }
-Part unknown { Name RE2 }
-Part unknown { Name Q2 }
+Part unknown { Name R8 }
 Part unknown { Name A3 }
-Part unknown { Name R3 }
 Part unknown { Name A2 }
-Part unknown { Name RE1 }
-Part unknown { Name Q1 }  <--- Not present with diff-files output
 Part unknown { Name A1 }
[snip]

The index is clean on TwoStageAmp-output.net (but by now a million
other files are dirty in the index). While I discovered this issue
with Ubuntu's 1.7.1, I got the same behaviour with git
1.7.12.rc2.18.g61b472e

What's going on here? I'll leave my tree in whatever weird state it
might be, for a while, in case anyone wants me to try various things.
At this point I want to understand what's going on, in case there's
either a learning moment for me or a bug, rather than just finding a
workaround.

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

end of thread, other threads:[~2012-08-14 13:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-13  8:55 git diff vs git diff-files Bernd Jendrissek
2012-08-13 15:02 ` Thomas Rast
2012-08-13 16:06   ` Bernd Jendrissek
2012-08-14  8:18     ` Thomas Rast
2012-08-14  9:15       ` Bernd Jendrissek
2012-08-14  9:55         ` Thomas Rast
2012-08-14 11:09           ` Andreas Schwab
2012-08-14 13:11           ` Bernd Jendrissek
2012-08-13 15:13 ` Matthieu Moy

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.