summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--commit.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/commit.sh b/commit.sh
index b85ddff..1190715 100644
--- a/commit.sh
+++ b/commit.sh
@@ -67,7 +67,8 @@ function systr_commit
exit 1
fi
- branchcommit=$(systr_repo_resolve_reference "$branch") || branchcommit="$BASE"
+ branchcommit=$(systr_repo_resolve_reference "$branch" 2>/dev/null) || branchcommit="$BASE"
+ systr_repo_resolve_reference "$branch" >/dev/null 2>&1 || echo "Creating new branch $branch"
if [[ "$BASE" != "$branchcommit" ]]; then
echo "Worktree is out-of-date, won't commit"