vendor/libgit2/src/mwindow.c in rugged-1.1.0 vs vendor/libgit2/src/mwindow.c in rugged-1.1.1
- old
+ new
@@ -293,11 +293,13 @@
git_mwindow *mru_window = NULL;
if (!git_mwindow_scan_recently_used(
current_file, &mru_window, NULL, true, GIT_MWINDOW__MRU)) {
continue;
}
- if (!lru_window || lru_window->last_used > mru_window->last_used)
+ if (!lru_window || lru_window->last_used > mru_window->last_used) {
+ lru_window = mru_window;
lru_file = current_file;
+ }
}
if (!lru_file) {
git_error_set(GIT_ERROR_OS, "failed to close memory window file; couldn't find LRU");
return -1;