Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bulk-checkin.c2
-rwxr-xr-xt/t5351-unpack-large-objects.sh10
2 files changed, 10 insertions, 2 deletions
diff --git a/bulk-checkin.c b/bulk-checkin.c
index 98ec893842..855b68ec23 100644
--- a/bulk-checkin.c
+++ b/bulk-checkin.c
@@ -340,6 +340,8 @@ void fsync_loose_object_bulk_checkin(int fd, const char *filename)
*/
if (!bulk_fsync_objdir ||
git_fsync(fd, FSYNC_WRITEOUT_ONLY) < 0) {
+ if (errno == ENOSYS)
+ warning(_("core.fsyncMethod = batch is unsupported on this platform"));
fsync_or_die(fd, filename);
}
}
diff --git a/t/t5351-unpack-large-objects.sh b/t/t5351-unpack-large-objects.sh
index f785cb0617..dd7ebc4007 100755
--- a/t/t5351-unpack-large-objects.sh
+++ b/t/t5351-unpack-large-objects.sh
@@ -70,9 +70,15 @@ test_expect_success 'unpack big object in stream (core.fsyncmethod=batch)' '
GIT_TRACE2_EVENT="$(pwd)/trace2.txt" \
GIT_TEST_FSYNC=true \
git -C dest.git $BATCH_CONFIGURATION unpack-objects <pack-$PACK.pack &&
- check_fsync_events trace2.txt <<-\EOF &&
+ if grep "core.fsyncMethod = batch is unsupported" trace2.txt
+ then
+ flush_count=7
+ else
+ flush_count=1
+ fi &&
+ check_fsync_events trace2.txt <<-EOF &&
"key":"fsync/writeout-only","value":"6"
- "key":"fsync/hardware-flush","value":"1"
+ "key":"fsync/hardware-flush","value":"$flush_count"
EOF
test_dir_is_empty dest.git/objects/pack &&