mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-30 09:40:09 +00:00
limit output to 10 last branches; configurable
This commit is contained in:
parent
09976595be
commit
7ab8271cd9
1 changed files with 2 additions and 1 deletions
|
@ -3,9 +3,10 @@
|
|||
#######################################
|
||||
|
||||
function git-checkout-interactive() {
|
||||
local ITEMS_TO_SHOW=10
|
||||
# Get all branches sorted by committer date, along with their last commit hash
|
||||
local branches
|
||||
branches=$(git for-each-ref --sort=-committerdate --format='%(refname:short) %(objectname:short)' refs/heads/)
|
||||
branches=$(git for-each-ref --count="$ITEMS_TO_SHOW" --sort=-committerdate --format='%(refname:short) %(objectname:short)' refs/heads/)
|
||||
|
||||
# Parse branches
|
||||
local branch_list=()
|
||||
|
|
Loading…
Reference in a new issue