summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-09-24 19:35:42 (GMT)
committerWerner Almesberger <werner@almesberger.net>2016-09-24 19:35:42 (GMT)
commit02e648cdf7d30a1c77e101517cb9a2a03c3d92d7 (patch)
tree0e68e30360b0f02bf72b9bc15396311421d94d7a /gui
parentb830f902777165382475e545dc08cdecdd6b7242 (diff)
downloadeeshow-02e648cdf7d30a1c77e101517cb9a2a03c3d92d7.zip
eeshow-02e648cdf7d30a1c77e101517cb9a2a03c3d92d7.tar.gz
eeshow-02e648cdf7d30a1c77e101517cb9a2a03c3d92d7.tar.bz2
file/git-hist.c (vcs_git_history): limit depth of history retrieval
We used to retrieve the entire history, but if we afterwards only use the topmost N entries, we need - in the worse case - only the first N entries from each branch. We could try to be even more efficient, but that would require doing part of the sorting already during retrieval, which would make things messy.
Diffstat (limited to 'gui')
-rw-r--r--gui/gui.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gui/gui.c b/gui/gui.c
index f218283..8f9e25a 100644
--- a/gui/gui.c
+++ b/gui/gui.c
@@ -418,10 +418,10 @@ static void get_history(struct gui *gui, const char *name, int limit)
return;
}
- gui->vcs_history = vcs_git_history(name);
- hist_iterate(gui->vcs_history, count_history, gui);
if (limit < 0)
limit = -limit;
+ gui->vcs_history = vcs_git_history(name, limit);
+ hist_iterate(gui->vcs_history, count_history, gui);
if (limit && gui->hist_size > limit)
gui->hist_size = limit;
}