From eeb42f5e5432a499f3bb2e4ca29f702ed20bdc3a Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Tue, 30 Aug 2016 23:21:18 +0200 Subject: [PATCH] git completions: Only show last 1000 commits This can be prohibitively slow on large repositories (minutes!). While regrettable, no user is going to like waiting that long. Work towards #3342, rerun of #3230. Many thanks to @gladhorn for the idea! --- share/completions/git.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/completions/git.fish b/share/completions/git.fish index 4d43919b4..d49ccfd64 100644 --- a/share/completions/git.fish +++ b/share/completions/git.fish @@ -6,7 +6,7 @@ function __fish_git_commits # This allows filtering by subject with the new pager! # Because even subject lines can be quite long, # trim them (abbrev'd hash+tab+subject) to 73 characters - command git log --pretty=tformat:"%h"\t"%s" --all ^/dev/null \ + command git log --pretty=tformat:"%h"\t"%s" --all --max-count=1000 ^/dev/null \ | string replace -r '(.{73}).+' '$1…' end