From 10fb90c36b245c1f0e876f16c9cd2d838e9be1b5 Mon Sep 17 00:00:00 2001 From: smckown Date: Mon, 23 Nov 2009 20:30:03 +0000 Subject: [PATCH] git-publish-branch shouldn't output program name in most error messages. Also, don't use exit 127 as this is command-not-found. --- git-publish-branch | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/git-publish-branch b/git-publish-branch index 9026e00..4986c36 100755 --- a/git-publish-branch +++ b/git-publish-branch @@ -49,14 +49,14 @@ if [ $delete ]; then fi else if [ -z "$local_ref" ]; then - echo "$0: no local branch $branch" >&2 - exit 127 + echo "no local branch $branch" >&2 + exit 1 elif [ -n "$remote_ref" ]; then - echo "$0: $remote already has branch $branch" >&2 - exit 127 + echo "$remote already has branch $branch" >&2 + exit 1 elif [ -n "$remote_config" ]; then - echo "$0: local branch $branch is already a tracking branch" >&2 - exit 127 + echo "local branch $branch is already a tracking branch" >&2 + exit 1 fi git push "$remote" "$branch:refs/heads/$branch" -- 2.39.2