aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2018-02-20 23:47:41 +0100
committerTeddy Wing2018-02-20 23:49:17 +0100
commit121101f5bb5d95f1d70379c6b2be592e03b133a8 (patch)
tree045535d6c1253d5e88e32809a84bd1c6a90ec3a6
parent624b484044de1b1c5f28f332422c5842e592e0b1 (diff)
downloadgit-branch-list-121101f5bb5d95f1d70379c6b2be592e03b133a8.tar.bz2
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`.
-rwxr-xr-xgit-branch-list2
1 files changed, 1 insertions, 1 deletions
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 $?
}