]> oss.titaniummirror.com Git - git-utils.git/commitdiff
git-publish-branch shouldn't output program name in most error messages.
authorsmckown <smckown@986fd584-583e-0410-b54d-b9fe63dff8e5>
Mon, 23 Nov 2009 20:30:03 +0000 (20:30 +0000)
committersmckown <smckown@986fd584-583e-0410-b54d-b9fe63dff8e5>
Mon, 23 Nov 2009 20:30:03 +0000 (20:30 +0000)
Also, don't use exit 127 as this is command-not-found.

git-publish-branch

index 9026e0072759eb39d0abfd374675dddd3e4257ae..4986c363d9c5d3f02d61c1714e560c0acba7088b 100755 (executable)
@@ -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"