git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Test for failing pread() on cygwin.

From
SHStefan-W. Hahn <stefan.hahn@s-hahn.de>
Date
Jan 9, 2007, 18:51 UTC
Message-ID
<48882.0957871669$1168368739@news.gmane.org>
In-Reply-To
<11683687161816-git-send-email->
From: Stefan-W. Hahn <stefan.hahn@s-hahn.de>
Signed-off-by: Stefan-W. Hahn <stefan.hahn@s-hahn.de>
---
 t/t5610-clone-fail.sh |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)
diff --git a/t/t5610-clone-fail.sh b/t/t5610-clone-fail.sh
new file mode 100755
index 0000000..d30b25e
--- /dev/null
+++ b/t/t5610-clone-fail.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# Copyright (C) 2007 Stefan-W. Hahn <stefan.hahn@s-hahn.de>
+#
+
+test_description='test git-clone failure on cygwin using pread()
+
+This test covers the fact that git-clone fails, if pread() does not
+work properly, because the size of objects makes it neccessary to
+read data from a not zero offset.'
+
+. ./test-lib.sh
+
+# Need a repo to clone
+test_create_repo foo2
+
+GIT_AUTHOR_EMAIL=xxxxxxxx@yyyyyyyy.yyyyy.yyyyyyy.yyy
+GIT_COMMITTER_EMAIL=xxxxxxxx@yyyyyyyy.yyyyy.yyyyyyy.yyy
+export GIT_AUTHOR_EMAIL
+export GIT_COMMITTER_EMAIL
+
+(cd foo2 && echo "Hello" > file && git add file && git commit -m 'add file' >/dev/null 2>&1)
+(cd foo2 && echo "Hello2" >> file && git commit -a -m 'test' >/dev/null 2>&1)
+
+test_expect_success \
+    'clone with resolving' \
+    'git-clone foo2 bar2'
+
+test_done
-- 
1.4.4.4.g46aa
Next: Stefan-W. Hahn
Message 1 of 3 in “Test for failing pread() on cygwin.”
  1. Test for failing pread() on cygwin.Stefan-W. Hahn, Jan 9, 2007
  2. Replacing the system call pread() with lseek()/xread()/lseek() sequence.Stefan-W. Hahn, Jan 9, 2007
  3. Junio C HamanoJan 9, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.