Skip to content

Commit

Permalink
Merge fixes up to 1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Junio C Hamano committed Feb 16, 2006
2 parents f8f135c + babfaf8 commit 5f906b1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 $@

Expand Down
19 changes: 14 additions & 5 deletions git-checkout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
8 changes: 7 additions & 1 deletion git-clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5f906b1

Please sign in to comment.