posix4e / git-repo

Automatically exported from code.google.com/p/git-repo
Apache License 2.0
1 stars 1 forks source link

Repo sync fails with SHA1 revision and depth=1 #208

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Affected Version: repo v1.12.30.1
Environment: Ubuntu

What steps will reproduce the problem?
1. repo init -u git://codeaurora.org/platform/manifest.git -b release -m 
LA.AF.1.1-01910-8064.0.xml --depth=1
2. repo sync

What is the expected output?
All repo syncs

What do you see instead?
Lots of repo sync failures, heres a specific output from running 'repo --trace 
sync platform/external/protobuf-c'
$ repo --trace sync platform/external/protobuf-c
: git config --file /home/ubuntu/projects/aosp/src/.repo/manifests.git/config 
--null --list 1>| 2>|
: parsing /home/ubuntu/.gitconfig
: git config --file /home/ubuntu/projects/aosp/src/.repo/repo/.git/config 
--null --list 1>| 2>|
: export GIT_DIR=/home/ubuntu/projects/aosp/src/.repo/manifests.git
: git fetch --progress --depth=1 origin --no-tags 
+refs/heads/release:refs/remotes/origin/release 1>| 2>|
remote: Total 0 (delta 0), reused 0 (delta 0)
: load refs /home/ubuntu/projects/aosp/src/.repo/manifests.git
: git symbolic-ref -m manifest set to refs/heads/release refs/remotes/m/release 
refs/remotes/origin/release 1>| 2>|
: scan refs /home/ubuntu/projects/aosp/src/.repo/manifests.git
Fetching project platform/external/protobuf-c

: export 
GIT_DIR=/home/ubuntu/projects/aosp/src/.repo/project-objects/platform/external/p
rotobuf-c.git
: git init 1>| 2>|
: git config --file 
/home/ubuntu/projects/aosp/src/.repo/projects/external/protobuf-c.git/config 
--null --list 1>| 2>|
: git config --file 
/home/ubuntu/projects/aosp/src/.repo/projects/external/protobuf-c.git/config 
--unset-all core.bare 1>| 2>|
: git config --file 
/home/ubuntu/projects/aosp/src/.repo/projects/external/protobuf-c.git/config 
--replace-all remote.caf.url git://codeaurora.org/platform/external/protobuf-c 
1>| 2>|
: git config --file 
/home/ubuntu/projects/aosp/src/.repo/projects/external/protobuf-c.git/config 
--replace-all remote.caf.review codeaurora.org 1>| 2>|
: git config --file 
/home/ubuntu/projects/aosp/src/.repo/projects/external/protobuf-c.git/config 
--replace-all remote.caf.projectname platform/external/protobuf-c 1>| 2>|
: git config --file 
/home/ubuntu/projects/aosp/src/.repo/projects/external/protobuf-c.git/config 
--replace-all remote.caf.fetch +refs/heads/*:refs/remotes/caf/* 1>| 2>|

: export 
GIT_DIR=/home/ubuntu/projects/aosp/src/.repo/projects/external/protobuf-c.git
: git rev-parse --verify f5acb16b4e8b57f5be4083960023982443bddbca^0 1>| 2>|
: git --version 1>| 2>|
: git fetch --progress --depth=1 caf --no-tags 
f5acb16b4e8b57f5be4083960023982443bddbca 1>| 2>|
: git fetch --progress --depth=1 caf --no-tags 
f5acb16b4e8b57f5be4083960023982443bddbca 1>| 2>|
: git pack-refs --all --prune 1>| 2>|
: git rev-parse --verify f5acb16b4e8b57f5be4083960023982443bddbca^0 1>| 2>|
error: Cannot fetch platform/external/protobuf-c

error: Exited sync due to fetch errors

Please provide any additional information below:
This does not occur if I remove the depth=1 from repo init

Original issue reported on code.google.com by blake.ar...@intersection.com on 1 Oct 2015 at 5:04

GoogleCodeExporter commented 8 years ago
Is there any solution for this?

Fetching project android/platform/external/jmdns
error: Cannot fetch android/platform/external/jmdns

error: Exited sync due to fetch errors

Original comment by rasal.n...@gmail.com on 30 Oct 2015 at 10:04

kynzie commented 6 years ago

I have the same issue. If the remote uses https protocol (i.e. https://android.googlesource.com/platform/manifest), clone depth and sha1 revision work together like a charm. However, if the remote uses ssh protocol, I get this error.

DalaiLlama commented 6 years ago

From what I've seen, it appears the issue is in the remote's version of git. When the remote machine has git version 2.7.4, we fail to download the source. Downgrading git to v2.17.1, all is peachy.

Interestingly, git fetch -v --depth 1 origin <SHA-1> fails. git fetch -v --depth 1 origin <branch> works.