git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] FIX git pull failure with shallow clone changes

From
Aneesh Kumar K.V <aneesh.kumar@gmail.com>
Date
Nov 10, 2006, 06:27 UTC
Message-ID
<45541BBE.4070303@gmail.com>
In-Reply-To
<45541503.4020604@gmail.com>

I was using the pu branch i tried to update the git repository and i got this error.

walk 9e950efa20dc8037c27509666cba6999da9368e8
walk 3b6a792f6ace33584897d1af08630c9acc0ce221
* refs/heads/origin: fast forward to branch 'master' of
http://repo.or.cz/r/linux-2.6
old..new: 3d42488..088406b
Auto-following refs/tags/v2.6.19-rc5
shallow clone with http not supported

This repository was not cloned with -depth. I only updated the git tools using the pu branch

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com>
---
 git-fetch.sh |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/git-fetch.sh b/git-fetch.sh
index 8b46e73..14ba4b2 100755
--- a/git-fetch.sh
+++ b/git-fetch.sh
@@ -314,9 +314,9 @@ fetch_main () {
 	      noepsv_opt="--disable-epsv"
 	  fi
 	  max_depth=5
-	  depth=0
+	  cur_depth=0
 	  head="ref: $remote_name"
-	  while (expr "z$head" : "zref:" && expr $depth \< $max_depth) >/dev/null
+	  while (expr "z$head" : "zref:" && expr $cur_depth \< $max_depth) >/dev/null
 	  do
 	    remote_name_quoted=$(@@PERL@@ -e '
 	      my $u = $ARGV[0];
@@ -325,7 +325,7 @@ fetch_main () {
 	      print "$u";
 	  ' "$head")
 	    head=$(curl -nsfL $curl_extra_args $noepsv_opt "$remote/$remote_name_quoted")
-	    depth=$( expr \( $depth + 1 \) )
+	    cur_depth=$( expr \( $cur_depth + 1 \) )
 	  done
 	  expr "z$head" : "z$_x40\$" >/dev/null ||
 	      die "Failed to fetch $remote_name from $remote"
-- 
1.4.4.rc1.g368c-dirty
Previous: Aneesh Kumar K.VNext: Johannes Schindelin
Message 3 of 4 in “shallow clone failed git pull”
  1. Aneesh Kumar K.VNov 9, 2006
  2. Aneesh Kumar K.VNov 10, 2006
  3. FIX git pull failure with shallow clone changesAneesh Kumar K.V, Nov 10, 2006
  4. Johannes SchindelinNov 13, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.