There is following log:
$ git log
commit d335ed918ecadec2152152f76fd3c99dc59de80b
Author: author <author@email.com>
Date: Wed Feb 29 18:45:48 2012 +0100
a
commit ed937db6bb2350e37ffb1d0e2e4141ec4e650bcf
Author: author <author@email.com>
Date: Wed Feb 29 18:45:22 2012 +0100
a
commit 87dde7bc9fc081388b824f7e74267485fcc4edb0
Author: author <author@email.com>
Date: Wed Feb 29 17:26:49 2012 +0100
init
$ git diff ed937db6bb2350e37ffb1d0e2e4141ec4e650bcf d335ed918ecadec2152152f76fd3c99dc59de80b --full-index
diff --git a/a.cpp b/a.cpp
index f0df46dd3ce8569533dce862927c1b84cec41c04..0fe7d3905febc2c4abb08849bef266c093f6caca 100755
--- a/a.cpp
+++ b/a.cpp
@@ -1 +1 @@
-class A{};
+class A{}fdfds;
The problem is that ed937db6bb2350e37ffb1d0e2e4141ec4e650bcf changed to f0df46dd3ce8569533dce862927c1b84cec41c04 and d335ed918ecadec2152152f76fd3c99dc59de80b changed to 0fe7d3905febc2c4abb08849bef266c093f6caca when processing by git diff. How to make that these values don’t change and remain the same?
Nothing changed, as it states in the message,
f0df46d...&0fe7d39...are references in the Git index, which are for the actual file in those commits. If you had multiple files listed in your diff they would all have different index SHAs.