From a78577d6134ba6f1734a72babe8e2916585218a3 Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Fri, 6 Jan 2012 16:06:36 +0800 Subject: [PATCH] Don't exit from a function, return --- lib/git/tools.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/git/tools.sh b/lib/git/tools.sh index c04bce2..c93fa82 100644 --- a/lib/git/tools.sh +++ b/lib/git/tools.sh @@ -72,7 +72,7 @@ git_exclude_basename() { git_bisect_grep() { if [ -z "$2" ]; then echo "Usage: $0 "; - exit 1 + return fi if [ -n "$3" ]; then search_path="$3"; else search_path="."; fi git bisect start @@ -89,7 +89,7 @@ git_bisect_grep() { git_submodule_rm() { if [ -z "$1" ]; then echo "Usage: $0 path/to/submodule (no trailing slash)" - exit 1 + return fi git config -f .git/config --remove-section "submodule.$1" git config -f .gitmodules --remove-section "submodule.$1" @@ -104,7 +104,7 @@ git_submodule_rm() { git_swap_remotes() { if [ -z "$2" ]; then echo "Usage: $0 remote1 remote2" - exit 1 + return fi git remote rename "$1" "$1_temp" git remote rename "$2" "$1"