* [PATCH] Problem: 'trap...exit' causes error message when /bin/sh is ash.
@ 2006-05-22 19:34 Yakov Lerner
0 siblings, 0 replies; only message in thread
From: Yakov Lerner @ 2006-05-22 19:34 UTC (permalink / raw)
To: git; +Cc: iler.ml
Problem: 'trap...exit' causes error message when /bin/sh is ash.
Fix: Change 'trap...exit' to 'trap...0' like in other scripts.
Signed-off-by: Yakov Lerner <iler.ml@gmail.com>
---
git-clone.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
954e49bc242cacd27e002f194d54a6895e64f88c
diff --git a/git-clone.sh b/git-clone.sh
index 227245c..d96894d 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -199,7 +199,7 @@ # Try using "humanish" part of source re
[ -e "$dir" ] && echo "$dir already exists." && usage
mkdir -p "$dir" &&
D=$(cd "$dir" && pwd) &&
-trap 'err=$?; cd ..; rm -r "$D"; exit $err' exit
+trap 'err=$?; cd ..; rm -r "$D"; exit $err' 0
case "$bare" in
yes) GIT_DIR="$D" ;;
*) GIT_DIR="$D/.git" ;;
@@ -407,5 +407,5 @@ Pull: refs/heads/$head_points_at:$origin
fi
rm -f "$GIT_DIR/CLONE_HEAD" "$GIT_DIR/REMOTE_HEAD"
-trap - exit
+trap - 0
--
1.3.GIT
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-05-22 19:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-22 19:34 [PATCH] Problem: 'trap...exit' causes error message when /bin/sh is ash Yakov Lerner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox