mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
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!
This commit is contained in:
parent
35bee00802
commit
eeb42f5e54
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue