4

I would like to clone a repo without having the manifest on a branch.

My build system creates static manifest files with repo manifest -o static.xml -r I'm looking for a smart way of checking out a workspace the exact same contents from those files.

Both the usual syntax of repo init -u url and previous answers to similair questions shows how this could be achieved if I put the static manifest files on a branch in a local git. However I would like avoid this extra step and checkout directly from my manifest.

Are there some other functionality in repo which could be used to achieve this?

Simson
  • 3,373
  • 2
  • 24
  • 38
  • 1
    Are you aware of local manifest ? https://gerrit.googlesource.com/git-repo/+/master/docs/manifest-format.md#Local-Manifests This does not answer your question but it may help. – Hugo y Sep 27 '19 at 11:46
  • It is almost what I'm looking for, I think I will create a empty manifest xml in a git repo and initiate my workspace from it and copy my static manifest to .repo dir and then `repo sync -m static.xml` – Simson Sep 27 '19 at 13:16

1 Answers1

4

From my investigations I have learnt it is not possible to create a repo from only a static manifest which was my first intentions.

However it is possible to create a skeleton manifest on a branch and use it for init then copy a static xml file to .repo/manifest and sync with it without it being under version control.

repo init -u remote/branch
cp static.xml .repo/manifests/
repo sync -m static.xml
Simson
  • 3,373
  • 2
  • 24
  • 38