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
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2012-03-29 19:49:57 +0400
committerCarlos Martín Nieto <carlos@cmartin.tk>2012-04-14 00:19:44 +0400
commit3f93e16cff90e71dad434729b3acdc437fb06436 (patch)
tree57e0986303d9258193e2b01349048589cca79f48 /src/mwindow.c
parentfa679339c433cf7b478f9badd37ec9e093a3f0af (diff)
indexer: start writing the stream indexer
This will allow us to index a packfile as soon as we receive it from the network as well as storing it with its final name so we don't need to pass temporary file names around.
Diffstat (limited to 'src/mwindow.c')
-rw-r--r--src/mwindow.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mwindow.c b/src/mwindow.c
index 7fe02b9ce..31b98fb92 100644
--- a/src/mwindow.c
+++ b/src/mwindow.c
@@ -89,6 +89,7 @@ void git_mwindow_scan_lru(
{
git_mwindow *w, *w_l;
+ puts("LRU");
for (w_l = NULL, w = mwf->windows; w; w = w->next) {
if (!w->inuse_cnt) {
/*
@@ -210,14 +211,16 @@ unsigned char *git_mwindow_open(
git_mwindow_ctl *ctl = &GIT_GLOBAL->mem_ctl;
git_mwindow *w = *cursor;
+
if (!w || !git_mwindow_contains(w, offset + extra)) {
if (w) {
w->inuse_cnt--;
}
for (w = mwf->windows; w; w = w->next) {
- if (git_mwindow_contains(w, offset + extra))
+ if (git_mwindow_contains(w, offset + extra)) {
break;
+ }
}
/*
@@ -246,6 +249,7 @@ unsigned char *git_mwindow_open(
if (left)
*left = (unsigned int)(w->window_map.len - offset);
+ fflush(stdout);
return (unsigned char *) w->window_map.data + offset;
}