From cd120958926681c8f2a870f2b0a480e056868a15 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Tue, 29 Aug 2017 02:25:57 -0400 Subject: Fix commit to new branch bug Squeltched "X not a revision" message and now printing "Creating new branch X" instead. --- commit.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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" -- cgit v1.2.3