* shallow clone failed git pull
@ 2006-11-09 4:02 Aneesh Kumar K.V
2006-11-10 5:58 ` Aneesh Kumar K.V
0 siblings, 1 reply; 4+ messages in thread
From: Aneesh Kumar K.V @ 2006-11-09 4:02 UTC (permalink / raw)
To: git
I was using the pu branch i tried to update the git repository and i got this error.
alk 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: shallow clone failed git pull
2006-11-09 4:02 shallow clone failed git pull Aneesh Kumar K.V
@ 2006-11-10 5:58 ` Aneesh Kumar K.V
2006-11-10 6:27 ` [PATCH] FIX git pull failure with shallow clone changes Aneesh Kumar K.V
0 siblings, 1 reply; 4+ messages in thread
From: Aneesh Kumar K.V @ 2006-11-10 5:58 UTC (permalink / raw)
To: Aneesh Kumar K.V, git
[-- Attachment #1: Type: text/plain, Size: 682 bytes --]
Aneesh Kumar K.V wrote:
> I was using the pu branch i tried to update the git repository and i got
> this error.
>
> alk 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
>
The attached patch gets it working. I am not sure whether the fix is the right one. I
am a little bit confused regarding the $depth being incremented.
-aneesh
[-- Attachment #2: git-fetch.sh.diff --]
[-- Type: text/x-patch, Size: 1402 bytes --]
diff --git a/git-fetch.sh b/git-fetch.sh
index 8b46e73..6459994 100755
--- a/git-fetch.sh
+++ b/git-fetch.sh
@@ -21,7 +21,7 @@ update_head_ok=
exec=
upload_pack=
keep=
-depth=
+depth=0
while case "$#" in 0) break ;; esac
do
case "$1" in
@@ -304,7 +304,7 @@ fetch_main () {
# There are transports that can fetch only one head at a time...
case "$remote" in
http://* | https://* | ftp://*)
- test -n "$depth" && die "shallow clone with http not supported"
+ [ x"$depth" != x0 ] && die "shallow clone with http not supported"
proto=`expr "$remote" : '\([^:]*\):'`
if [ -n "$GIT_SSL_NO_VERIFY" ]; then
curl_extra_args="-k"
@@ -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 \) )
+ # depth=$( expr \( $depth + 1 \) )
done
expr "z$head" : "z$_x40\$" >/dev/null ||
die "Failed to fetch $remote_name from $remote"
@@ -333,7 +333,7 @@ fetch_main () {
git-http-fetch -v -a "$head" "$remote/" || exit
;;
rsync://*)
- test -n "$depth" && die "shallow clone with rsync not supported"
+ [ x"$depth" != x0 ] && die "shallow clone with http not supported"
TMP_HEAD="$GIT_DIR/TMP_HEAD"
rsync -L -q "$remote/$remote_name" "$TMP_HEAD" || exit 1
head=$(git-rev-parse --verify TMP_HEAD)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] FIX git pull failure with shallow clone changes
2006-11-10 5:58 ` Aneesh Kumar K.V
@ 2006-11-10 6:27 ` Aneesh Kumar K.V
2006-11-13 12:26 ` Johannes Schindelin
0 siblings, 1 reply; 4+ messages in thread
From: Aneesh Kumar K.V @ 2006-11-10 6:27 UTC (permalink / raw)
To: Aneesh Kumar K.V, git
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: 0001-I-was-using-the-pu-branch-i-tried-to-update-the-git-repository-and-i.txt --]
[-- Type: text/plain, Size: 1470 bytes --]
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] FIX git pull failure with shallow clone changes
2006-11-10 6:27 ` [PATCH] FIX git pull failure with shallow clone changes Aneesh Kumar K.V
@ 2006-11-13 12:26 ` Johannes Schindelin
0 siblings, 0 replies; 4+ messages in thread
From: Johannes Schindelin @ 2006-11-13 12:26 UTC (permalink / raw)
To: Aneesh Kumar K.V; +Cc: git
Hi,
I overlooked that the http transport uses the variable "depth" already,
which your patch fixes.
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Ciao,
Dscho
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-11-13 12:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-09 4:02 shallow clone failed git pull Aneesh Kumar K.V
2006-11-10 5:58 ` Aneesh Kumar K.V
2006-11-10 6:27 ` [PATCH] FIX git pull failure with shallow clone changes Aneesh Kumar K.V
2006-11-13 12:26 ` Johannes Schindelin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).