repo sync - "error: unknown option `unshallow'"

1,152 views
Skip to first unread message

vishalm

unread,
Mar 13, 2015, 3:24:40 PM3/13/15
to android-...@googlegroups.com
Hi,

Lately when doing repo sync, I get this warning "error: unknown option `unshallow'" for trees with clone-depth set.
repo sync goes through fine, but I get this print for each tree with clone-depth set.

error: unknown option `unshallow'
usage: git fetch [<options>] [<repository> [<refspec>...]]
   or: git fetch [<options>] <group>
   or: git fetch --multiple [<options>] [(<repository> | <group>)...]
   or: git fetch --all [<options>]

    -v, --verbose         be more verbose
    -q, --quiet           be more quiet
    --all                 fetch from all remotes
    -a, --append          append to .git/FETCH_HEAD instead of overwriting
    --upload-pack <PATH>  path to upload pack on remote end
    -f, --force           force overwrite of local branch
    -m, --multiple        fetch from multiple remotes
    -t, --tags            fetch all tags and associated objects
    -n                    do not fetch all tags (--no-tags)
    -p, --prune           prune remote-tracking branches no longer on remote
    --recurse-submodules  control recursive fetching of submodules
    --dry-run             dry run
    -k, --keep            keep downloaded pack
    -u, --update-head-ok  allow updating of HEAD ref
    --progress            force progress reporting
    --depth <DEPTH>       deepen history of shallow clone


Any idea why I am getting this error. Thanks.


Regards,
Vishal

Magnus Bäck

unread,
Mar 16, 2015, 2:45:57 AM3/16/15
to android-...@googlegroups.com, Conley Owens
On Friday, March 13, 2015 at 20:22 CET,
vishalm <vishal....@gmail.com> wrote:

> Lately when doing repo sync, I get this warning "error: unknown option
> `unshallow'" for trees with clone-depth set.

The --unshallow option was introduced in Git 1.8.2 and your version of
Git appears to be older than that.

I suppose https://gerrit-review.googlesource.com/57060 should've upped
MIN_GIT_VERSION in the wrapper script to give users a better error
message.

[...]

--
Magnus Bäck | Software Engineer, Development Tools
magnu...@sonymobile.com | Sony Mobile Communications

Etienne de Villiers

unread,
Mar 16, 2015, 12:29:07 PM3/16/15
to android-...@googlegroups.com, Conley Owens
Hello Folks,

I had some trouble with this option myself.
Even if you do have the latest version of Git, I had some problems.
When I pulled the Android repository, I used the depth option of 1
(shallow repository fetch) to minimize the code download.
Later I wanted to push one of the projects to my own repository.
1. You can’t push a shallow repository
2. You have to have the right version of Git to do the unshallow
3. Git can raise an error about not being able to traverse the tree,
and it appears like a corrupt repository if you try an unshallow before
doing a fetch on the shallow git repository.
4. I seem to remember adding the unshallow switch after the repo name,
and it didn’t give an error… But this does not work. (Someone will have to
recheck this, going on memory)

Hope this helps someone
>--
>--
>You received this message because you are subscribed to the "Android
>Building" mailing list.
>To post to this group, send email to android-...@googlegroups.com
>To unsubscribe from this group, send email to
>android-buildi...@googlegroups.com
>For more options, visit this group at
>http://groups.google.com/group/android-building?hl=en
>
>---
>You received this message because you are subscribed to the Google Groups
>"Android Building" group.
>To unsubscribe from this group and stop receiving emails from it, send an
>email to android-buildi...@googlegroups.com.
>For more options, visit https://groups.google.com/d/optout.

Conley Owens

unread,
Mar 18, 2015, 5:44:21 PM3/18/15
to Etienne de Villiers, android-...@googlegroups.com
That's right Magnus, thanks.
https://gerrit-review.googlesource.com/#/c/66470/
Reply all
Reply to author
Forward
0 new messages