X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-fetch.sh;h=8564cbfd7abaf0c5aff8d79d660f40b6747d25a0;hb=f8348be3be8493a62110a09ab0343213990b416b;hp=0cb1596f50c998ba1f4ac0e2049e1c18459fc5a8;hpb=f865a2ad981f72423aa1c19412ce57c543801957;p=git.git diff --git a/git-fetch.sh b/git-fetch.sh index 0cb1596f..8564cbfd 100755 --- a/git-fetch.sh +++ b/git-fetch.sh @@ -114,7 +114,12 @@ fast_forward_local () { # is no way to guarantee "fast-forward" anyway. if test -f "$GIT_DIR/$1" then - echo >&2 "* $1: updating with $3" + if now_=$(cat "$GIT_DIR/$1") && test "$now_" = "$2" + then + echo >&2 "* $1: same as $3" + else + echo >&2 "* $1: updating with $3" + fi else echo >&2 "* $1: storing $3" fi @@ -176,7 +181,7 @@ if test "$tags" then taglist=$(git-ls-remote --tags "$remote" | sed -e ' - /\^{}$/d + /\^/d s/^[^ ]* // s/.*/&:&/') if test "$#" -gt 1 @@ -225,7 +230,7 @@ do $u =~ s{([^-a-zA-Z0-9/.])}{sprintf"%%%02x",ord($1)}eg; print "$u"; ' "$remote_name") - head=$(curl -nsf $curl_extra_args "$remote/$remote_name_quoted") && + head=$(curl -nsfL $curl_extra_args "$remote/$remote_name_quoted") && expr "$head" : "$_x40\$" >/dev/null || die "Failed to fetch $remote_name from $remote" echo >&2 Fetching "$remote_name from $remote" using http