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

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/unix
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2012-06-12 22:25:09 +0400
committerChris Young <chris@unsatisfactorysoftware.co.uk>2012-06-12 22:25:09 +0400
commit2aeadb9c78df4b463ffb3293e242e19a7e0d17a9 (patch)
treec81dc60b795f2de01600cbd63dbd16b8933f38d8 /src/unix
parent90490113af9cef092b36c5ee0231c11675ed9f51 (diff)
Actually do the mmap... unsurprisingly, this makes the indexer work on SFS
On RAM: the .idx and .pack files become links to a .lock and the original download respectively. Assume some feature (such as record locking) supported by SFS but not JXFS or RAM: is required.
Diffstat (limited to 'src/unix')
-rw-r--r--src/unix/map.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/unix/map.c b/src/unix/map.c
index 8e853b9be..b04e95a76 100644
--- a/src/unix/map.c
+++ b/src/unix/map.c
@@ -39,11 +39,11 @@ int p_mmap(git_map *out, size_t len, int prot, int flags, int fd, git_off_t offs
#else
if ((prot & GIT_PROT_WRITE) && ((flags & GIT_MAP_TYPE) == GIT_MAP_SHARED)) {
printf("Trying to map shared-writeable file!!!\n");
+ }
- if(out->data = malloc(len)) {
- lseek(fd, offset, SEEK_SET);
- p_read(fd, out->data, len);
- }
+ if(out->data = malloc(len)) {
+ lseek(fd, offset, SEEK_SET);
+ p_read(fd, out->data, len);
}
#endif