summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bc9e1b8)
raw | patch | inline | side by side (parent: bc9e1b8)
author | Ramsay Allan Jones <ramsay@ramsay1.demon.co.uk> | |
Sat, 29 Jul 2006 16:12:34 +0000 (17:12 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 2 Aug 2006 07:27:17 +0000 (00:27 -0700) |
This helps tests 5400,5600,5700,5710 "fail correctly" rather than
give some false positives. Also ensure cleanup actions in exit trap
work correctly even if user has alias rm='rm -i'.
Signed-off-by: Ramsay Allan Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
give some false positives. Also ensure cleanup actions in exit trap
work correctly even if user has alias rm='rm -i'.
Signed-off-by: Ramsay Allan Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-clone.sh | patch | blob | history |
diff --git a/git-clone.sh b/git-clone.sh
index a92b22a13d6b2932a8d816a8845d791c2f0e36d1..acc7a51b97c2ade58ab64299eb16c940a724c260 100755 (executable)
--- a/git-clone.sh
+++ b/git-clone.sh
[ -e "$dir" ] && echo "$dir already exists." && usage
mkdir -p "$dir" &&
D=$(cd "$dir" && pwd) &&
-trap 'err=$?; cd ..; rm -r "$D"; exit $err' 0
+trap 'err=$?; cd ..; rm -rf "$D"; exit $err' 0
case "$bare" in
yes)
GIT_DIR="$D" ;;
if test -f "$GIT_DIR/CLONE_HEAD"
then
# Read git-fetch-pack -k output and store the remote branches.
- @@PERL@@ -e "$copy_refs" "$GIT_DIR" "$use_separate_remote" "$origin"
+ @@PERL@@ -e "$copy_refs" "$GIT_DIR" "$use_separate_remote" "$origin" ||
+ exit
fi
cd "$D" || exit