From: Robert Wruck <wruck@tweerlei.de>
To: git@vger.kernel.org
Subject: [BUG] git cat-file does not terminate
Date: Fri, 04 Mar 2011 14:04:00 +0100 [thread overview]
Message-ID: <4D70E340.3050309@tweerlei.de> (raw)
Hi,
this is some strange behaviour of cat-file:
On a certain file, `git cat-file blob <objectname>` writes an endless
stream repeating the first 4096 byte of the original file.
cat-file -s and cat-file -t produce correct results.
Even stranger: This only happens with cygwin-git (1.7.4.1).
msysgit (same machine, same repository): works
linux-git (same machine, same repository): works
Even more strange: This only happens with cygwin on a particular machine
(recent cygwin1.dll 1.7.8) under WinXP/32bit. On another machine, recent
cygwin, Windows7/64bit it works...
Debugging a bit, I found that the following happens:
In xwrite (wrapper.c), write() is called with the total file size - in
my case about 87 MB. This call returns -1 and EAGAIN but nevertheless
writes 4096 byte to the output fd. I don't think that's expected
behaviour...
I "fixed" it by limiting each write to 64k (thus looping in
write_in_full) but maybe somebody knows about that cygwin behaviour?
This seems to be the cause of the dreaded "No newline found after blob"
when running `git svn clone` under cygwin on a repository with large files.
You could argue that this is a cygwin bug but maybe limiting each write
to a maximum size is a simple workaround.
-Robert
next reply other threads:[~2011-03-04 13:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-04 13:04 Robert Wruck [this message]
2011-03-04 15:40 ` [BUG] git cat-file does not terminate Peter Baumann
2011-03-04 16:00 ` Jeff King
2011-03-04 17:16 ` Junio C Hamano
2011-03-04 17:29 ` Robert Wruck
2011-03-04 18:26 ` Robert Wruck
2011-03-08 21:14 ` Jeff King
2011-03-08 22:52 ` Junio C Hamano
2011-03-09 14:49 ` Robert Wruck
2011-03-09 19:32 ` Junio C Hamano
2011-03-09 19:51 ` Robert Wruck
2011-03-09 21:43 ` Jeff King
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=4D70E340.3050309@tweerlei.de \
--to=wruck@tweerlei.de \
--cc=git@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.