mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-26 18:53:44 +08: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
|
@ -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 New Issue
Block a user