{"thread":{"id":"21699","subject":"[PATCH v2] git-count-objects: Fix a disk-space under-estimate on Cygwin","startedAt":"2009-11-20T23:27:11Z","lastAt":"2009-11-20T23:27:11Z","messageCount":1,"participants":["Ramsay Jones"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"128072","messageId":"4B0725CF.8030805@ramsay1.demon.co.uk","threadId":"21699","inReplyTo":null,"subject":"[PATCH v2] git-count-objects: Fix a disk-space under-estimate on Cygwin","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2009-11-20T23:27:11Z","receivedAt":"2009-11-20T23:27:11Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nOn Cygwin, the st_blocks field in 'struct stat' counts in blocks\nof st_blksize bytes. At least on NTFS, the st_blksize field is\nnot 512 bytes, as required by the code, which leads to an under\nestimate of the disk-space used.\n\nSetting the build variable NO_ST_BLOCKS_IN_STRUCT_STAT, switches\nto an algorithm that only uses the st_size field to compute the\ndisk-space estimate.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n\nChanged since v1:\n    - a commit message!\n    - removed comment.\n\nATB,\nRamsay Jones\n\n Makefile |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 5d5976f..8902dba 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -783,6 +783,7 @@ ifeq ($(uname_O),Cygwin)\n \tNO_FAST_WORKING_DIRECTORY = UnfortunatelyYes\n \tNO_TRUSTABLE_FILEMODE = UnfortunatelyYes\n \tOLD_ICONV = UnfortunatelyYes\n+\tNO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease\n \t# There are conflicting reports about this.\n \t# On some boxes NO_MMAP is needed, and not so elsewhere.\n \t# Try commenting this out if you suspect MMAP is more efficient\n-- \n1.6.5\n"}]}