diff options
| author | Vicent Martà <tanoku@gmail.com> | 2012-04-19 11:40:56 -0700 |
|---|---|---|
| committer | Vicent Martà <tanoku@gmail.com> | 2012-04-19 11:40:56 -0700 |
| commit | d59305544e4825a7668d6d2fa9df2a0ffa21a3d6 (patch) | |
| tree | 4ffce3f8c3e384ad8b1a242caed33e601626a123 /src/mwindow.c | |
| parent | 54e4d0f25b4a957fba23dee4119dff9427151b90 (diff) | |
| parent | 1c9c081a6a0e02ea8a148717083e3f7a769c5a2e (diff) | |
| download | libgit2-d59305544e4825a7668d6d2fa9df2a0ffa21a3d6.tar.gz | |
Merge remote-tracking branch 'carlosmn/indexer-stream' into new-error-handling
Diffstat (limited to 'src/mwindow.c')
| -rw-r--r-- | src/mwindow.c | 6 |
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; } |
