summaryrefslogtreecommitdiff
path: root/file/git-hist.h
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-09-24 16:35:42 -0300
committerWerner Almesberger <werner@almesberger.net>2016-09-24 16:35:42 -0300
commit02e648cdf7d30a1c77e101517cb9a2a03c3d92d7 (patch)
tree0e68e30360b0f02bf72b9bc15396311421d94d7a /file/git-hist.h
parentb830f902777165382475e545dc08cdecdd6b7242 (diff)
downloadeeshow-02e648cdf7d30a1c77e101517cb9a2a03c3d92d7.tar.gz
eeshow-02e648cdf7d30a1c77e101517cb9a2a03c3d92d7.tar.bz2
eeshow-02e648cdf7d30a1c77e101517cb9a2a03c3d92d7.zip
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 'file/git-hist.h')
-rw-r--r--file/git-hist.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/file/git-hist.h b/file/git-hist.h
index 58cb7eb..5e2aa56 100644
--- a/file/git-hist.h
+++ b/file/git-hist.h
@@ -52,7 +52,7 @@ struct vcs_history;
bool vcs_git_try(const char *path);
-struct vcs_history *vcs_git_history(const char *path);
+struct vcs_history *vcs_git_history(const char *path, unsigned depth);
char *vcs_git_get_rev(struct vcs_hist *h);
bool vcs_is_empty(const struct vcs_history *history);