Branch: refs/heads/master
Home:
https://github.com/msysgit/msysgit
Commit: 0a318d71d94475ae82127a7ff7e849f3c5c86260
https://github.com/msysgit/msysgit/commit/0a318d71d94475ae82127a7ff7e849f3c5c86260
Author: Kirill Smelkov <
ki...@mns.spb.ru>
Date: 2013-04-29 (Mon, 29 Apr 2013)
Changed paths:
M share/WinGit/copy-files.sh
Log Message:
-----------
copy-files.sh: Preserve bit-exactness of git-*.exe for DONT_REMOVE_BUILTINS
Currently, if client (i.e. share/WinGit/portable-release.sh) asks
copy-files.sh not to remove git builtins, we just keep them in bin/ and
libexec/git-core/ . The problem is, later, when those executables are
stripped, though initially they were identical, they all become
different, because:
For PE, strip (and everything from binutils) puts current time into
produced object in PE header into TimeDateStamp [1]:
---- 8< ---- bfd/peXXigen.c
H_PUT_32 (abfd, time (0), filehdr_out->f_timdat);
and that hurts, if later a user wants to hardlink'ify portable git
install.
Though strip has --preserve-dates, as said above, it does not affect the
_contents_ of the generated object file - only mtime/ctime are
preserved.
Let's preserve builtins ourselves - we already keep list of them in
etc/fileList-builtins.txt for msysgit installer (it relinks them at
install time), and for portable version, lets first remove all builtins
except git.exe, then strip, and then restore builtins bit-to-bit equal
to git.exe . This way, later hardlinkifying will work.
[1]
http://www.csn.ul.ie/~caolan/publink/winresdump/winresdump/doc/pefile2.html
Signed-off-by: Kirill Smelkov <
ki...@mns.spb.ru>
Signed-off-by: Johannes Schindelin <
johannes....@gmx.de>