From fa665bd3c8e6514c90a0a2e476a76c945ee9f488 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Fri, 15 Jun 2018 14:06:18 +0200 Subject: [PATCH] [completions/git] Remove unnecessary helper function --- share/completions/git.fish | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/share/completions/git.fish b/share/completions/git.fish index ecf49c5e1..c84098861 100644 --- a/share/completions/git.fish +++ b/share/completions/git.fish @@ -47,12 +47,9 @@ function __fish_git_tags command git tag --sort=-creatordate 2>/dev/null end -function __fish_git_dir - command git rev-parse --git-dir 2>/dev/null -end - function __fish_git_heads - set -l gitdir (__fish_git_dir) + set -l gitdir (command git rev-parse --git-dir 2>/dev/null) + or return # No git dir, no need to even test. for head in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD if test -f $gitdir/$head echo $head