Git development
 help / color / mirror / Atom feed
From: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
To: Junio C Hamano <gitster@pobox.com>
Cc: GIT Mailing-list <git@vger.kernel.org>
Subject: [PATCH v2] git-count-objects: Fix a disk-space under-estimate on Cygwin
Date: Fri, 20 Nov 2009 23:27:11 +0000	[thread overview]
Message-ID: <4B0725CF.8030805@ramsay1.demon.co.uk> (raw)


On Cygwin, the st_blocks field in 'struct stat' counts in blocks
of st_blksize bytes. At least on NTFS, the st_blksize field is
not 512 bytes, as required by the code, which leads to an under
estimate of the disk-space used.

Setting the build variable NO_ST_BLOCKS_IN_STRUCT_STAT, switches
to an algorithm that only uses the st_size field to compute the
disk-space estimate.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---

Changed since v1:
    - a commit message!
    - removed comment.

ATB,
Ramsay Jones

 Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index 5d5976f..8902dba 100644
--- a/Makefile
+++ b/Makefile
@@ -783,6 +783,7 @@ ifeq ($(uname_O),Cygwin)
 	NO_FAST_WORKING_DIRECTORY = UnfortunatelyYes
 	NO_TRUSTABLE_FILEMODE = UnfortunatelyYes
 	OLD_ICONV = UnfortunatelyYes
+	NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
 	# There are conflicting reports about this.
 	# On some boxes NO_MMAP is needed, and not so elsewhere.
 	# Try commenting this out if you suspect MMAP is more efficient
-- 
1.6.5

                 reply	other threads:[~2009-11-21 20:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B0725CF.8030805@ramsay1.demon.co.uk \
    --to=ramsay@ramsay1.demon.co.uk \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox