summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-02-16 03:39:21 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-02-16 03:39:21 (GMT)
commit5f906b1c34a174fb6a5eb03f8063859d1a487721 (patch)
tree1a4a356d3584265277a1d1db031406e43b13aa29
parentf8f135c9bae74f846a92e1f1f1fea8308802ace5 (diff)
parentbabfaf8dee0baa09c56d1a2ec5623b60d900518b (diff)
downloadgit-5f906b1c34a174fb6a5eb03f8063859d1a487721.zip
git-5f906b1c34a174fb6a5eb03f8063859d1a487721.tar.gz
git-5f906b1c34a174fb6a5eb03f8063859d1a487721.tar.bz2
Merge fixes up to 1.2.1
-rw-r--r--Makefile1
-rwxr-xr-xgit-checkout.sh19
-rwxr-xr-xgit-clone.sh8
3 files changed, 22 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index d40aa6a..648469e 100644
--- a/Makefile
+++ b/Makefile
@@ -419,6 +419,7 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
rm -f $@
sed -e '1s|#!.*/sh|#!$(call shq,$(SHELL_PATH))|' \
-e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
+ -e 's/@@NO_CURL@@/$(NO_CURL)/g' \
$@.sh >$@
chmod +x $@
diff --git a/git-checkout.sh b/git-checkout.sh
index 6a87c71..463ed2e 100755
--- a/git-checkout.sh
+++ b/git-checkout.sh
@@ -22,7 +22,7 @@ while [ "$#" != "0" ]; do
[ -e "$GIT_DIR/refs/heads/$newbranch" ] &&
die "git checkout: branch $newbranch already exists"
git-check-ref-format "heads/$newbranch" ||
- die "we do not like '$newbranch' as a branch name."
+ die "git checkout: we do not like '$newbranch' as a branch name."
;;
"-f")
force=1
@@ -75,9 +75,15 @@ done
if test "$#" -ge 1
then
+ hint=
+ if test "$#" -eq 1
+ then
+ hint="
+Did you intend to checkout '$@' which can not be resolved as commit?"
+ fi
if test '' != "$newbranch$force$merge"
then
- die "updating paths and switching branches or forcing are incompatible."
+ die "git checkout: updating paths is incompatible with switching branches/forcing$hint"
fi
if test '' != "$new"
then
@@ -117,7 +123,8 @@ fi
[ -z "$branch$newbranch" ] &&
[ "$new" != "$old" ] &&
- die "git checkout: you need to specify a new branch name"
+ die "git checkout: to checkout the requested commit you need to specify
+ a name for a new branch which is created and switched to"
if [ "$force" ]
then
@@ -165,8 +172,10 @@ else
exit 0
)
saved_err=$?
- test "$new" = "$old" ||
- git diff-index --name-status "$new"
+ if test "$saved_err" = 0
+ then
+ test "$new" = "$old" || git diff-index --name-status "$new"
+ fi
(exit $saved_err)
fi
diff --git a/git-clone.sh b/git-clone.sh
index 47f3ec9..e192b08 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -206,7 +206,13 @@ yes,yes)
fi
;;
http://*)
- clone_dumb_http "$repo" "$D"
+ if test -z "@@NO_CURL@@"
+ then
+ clone_dumb_http "$repo" "$D"
+ else
+ echo >&2 "http transport not supported, rebuild Git with curl support"
+ exit 1
+ fi
;;
*)
cd "$D" && case "$upload_pack" in