mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-20 05:41:14 -03:00
I have about fifty git branches for fish and I almost always `git checkout` between the most recent two or three - this makes the completions list more usable. If you're using `git cherry-pick` or `git merge`, etc. you also most likely to want to reference a recently changed branch. The decision was made to only sort local branches and not remote ones in the PR at #9248. The performance of changing from one `git for-each-ref` invocation to two separate ones (so we could sort them separately) was checked and found to be OK. Food for future thought: consider ergonomics, caveats, and performance of excluding the current branch's name from the list of completions (or perhaps only from the first completion). Or maybe there's another way to have `for-each-ref` give priority to a different branch while still sorting by recency?