From 121101f5bb5d95f1d70379c6b2be592e03b133a8 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 20 Feb 2018 23:47:41 +0100 Subject: git-branch-list(is_a_branch): Quiet `git rev-parse` We only care about the return code here. If `git rev-parse --verify` is successful or if it fails to find a branch with the given name, it will write output. We don't want this output to be printed, so send it to `/dev/null`. --- git-branch-list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-branch-list b/git-branch-list index 5d0bc44..26098e4 100755 --- a/git-branch-list +++ b/git-branch-list @@ -73,7 +73,7 @@ function branch_or_current_branch () { function is_a_branch () { local branch="$1" - git rev-parse --verify "$branch" + git rev-parse --verify "$branch" > /dev/null 2>&1 return $? } -- cgit v1.2.3