lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] Unexpected difference in git sha1sums


From: Greg Chicares
Subject: [lmi] Unexpected difference in git sha1sums
Date: Thu, 3 Mar 2016 21:00:13 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0

If I have two git repositories (one Cygwin, one GNU/Linux) that have
the same HEAD sha1sum, and I run 'git am' to apply the same patch to
each (verified by identical md5sums of the patch file), then shouldn't
I have the same commit sha1sum and the same new HEAD sha1sum on both?

I thought that was guaranteed, but it's not what I'm seeing when I
copy and paste this set of commands into both systems:
uname -a
git --version
md5sum 0001-Update-state-approvals.patch
rm -rf migrated/
mkdir migrated
cd migrated
git clone file:///tmp/migration/blessed/proprietary
cd proprietary
git rev-parse --verify HEAD
git am ../../0001-Update-state-approvals.patch
git log -1
git rev-parse --verify HEAD
git rev-parse --verify HEAD^

The only explanation I can think of for this discrepancy is that the
bare "blessed" repositories are not bit-for-bit identical: each was
generated on its respective system by applying the same script to the
same svn repository (the svn repositories are bit-for-bit identical).
But I thought the two checked-out git repositories were necessarily
equivalent in the Merkle-tree sense because their original HEADs match,
and that patching each one identically would preserve the HEAD sha1sum
equality.

Here's a screen copy from each system:

/tmp/migration[0]$uname -a
Linux turgon 3.2.0-4-amd64 #1 SMP Debian 3.2.73-2+deb7u2 x86_64 GNU/Linux
/tmp/migration[0]$git --version
git version 1.7.10.4
/tmp/migration[0]$md5sum 0001-Update-state-approvals.patch
af4b349f7562983d71d6801f4c0418d5  0001-Update-state-approvals.patch
/tmp/migration[0]$rm -rf migrated/
/tmp/migration[0]$mkdir migrated
/tmp/migration[0]$cd migrated
/tmp/migration/migrated[0]$git clone file:///tmp/migration/blessed/proprietary
Cloning into 'proprietary'...
remote: Counting objects: 6938, done.
remote: Compressing objects: 100% (572/572), done.
remote: Total 6938 (delta 6364), reused 6938 (delta 6364)
Receiving objects: 100% (6938/6938), 2.36 MiB, done.
Resolving deltas: 100% (6364/6364), done.
/tmp/migration/migrated[0]$cd proprietary
/tmp/migration/migrated/proprietary[0]$git rev-parse --verify HEAD
b5f2b3d4cfd179bbe4ac433d5bbe86d922bec2dc
/tmp/migration/migrated/proprietary[0]$git am 
../../0001-Update-state-approvals.patch
Applying: Update state approvals
/tmp/migration/migrated/proprietary[0]$git log -1
commit 64d5f83da4aa2cd3884c1c08949d31cb5d8777a4
Author: Gregory W. Chicares <address@hidden>
Date:   Thu Mar 3 01:57:18 2016 +0000

    Update state approvals
/tmp/migration/migrated/proprietary[0]$git rev-parse --verify HEAD
64d5f83da4aa2cd3884c1c08949d31cb5d8777a4
/tmp/migration/migrated/proprietary[0]$git rev-parse --verify HEAD^
b5f2b3d4cfd179bbe4ac433d5bbe86d922bec2dc


/tmp/migration[0]$uname -a
CYGWIN_NT-5.1 iluvatar 2.4.1(0.293/5/3) 2016-01-24 11:24 i686 Cygwin
/tmp/migration[0]$git --version
git version 2.7.0
/tmp/migration[0]$md5sum 0001-Update-state-approvals.patch
af4b349f7562983d71d6801f4c0418d5 *0001-Update-state-approvals.patch
/tmp/migration[0]$rm -rf migrated/
/tmp/migration[0]$mkdir migrated
/tmp/migration[0]$cd migrated
/tmp/migration/migrated[0]$git clone file:///tmp/migration/blessed/proprietary
Cloning into 'proprietary'...
remote: Counting objects: 6938, done.
remote: Compressing objects: 100% (556/556), done.
remote: Total 6938 (delta 6380), reused 6938 (delta 6380)
Receiving objects: 100% (6938/6938), 2.33 MiB | 0 bytes/s, done.
Resolving deltas: 100% (6380/6380), done.
Checking connectivity... done.
/tmp/migration/migrated[0]$cd proprietary
/tmp/migration/migrated/proprietary[0]$git rev-parse --verify HEAD
b5f2b3d4cfd179bbe4ac433d5bbe86d922bec2dc
/tmp/migration/migrated/proprietary[0]$git am 
../../0001-Update-state-approvals.patch
Applying: Update state approvals
/tmp/migration/migrated/proprietary[0]$git log -1
commit d670888acf513bb88eb68346c8b602fec968bf8b
Author: Gregory W. Chicares <address@hidden>
Date:   Thu Mar 3 01:57:18 2016 +0000

    Update state approvals
/tmp/migration/migrated/proprietary[0]$git rev-parse --verify HEAD
d670888acf513bb88eb68346c8b602fec968bf8b
/tmp/migration/migrated/proprietary[0]$git rev-parse --verify HEAD^
b5f2b3d4cfd179bbe4ac433d5bbe86d922bec2dc



reply via email to

[Prev in Thread] Current Thread [Next in Thread]