Skip to content
This repository has been archived by the owner on Mar 6, 2020. It is now read-only.

"clone" mode for gb-vendor #316

Open
vstarodub opened this issue Aug 21, 2015 · 4 comments
Open

"clone" mode for gb-vendor #316

vstarodub opened this issue Aug 21, 2015 · 4 comments

Comments

@vstarodub
Copy link

It would be convenient to be able to optionally clone vendored paths as proper repositories.

Use scenario:
I've got project repo and a shared repo. I'm developing a feature in the project repo and need to add some supporting code to the shared repo. I want able to write/test/commit the supporting code inside the "vendor/" dir.

Currently with gb, it looks like I've got following options:

  1. Manually copy changed files to a separately cloned repo to be able to commit them. This is quite tedious.
  2. Don't use gb-vendor for the shared repo. Clone a repo into the vendor dir. This essentially means using two separate vendoring mechanisms, e.g. using git submodule in addition to gb. It might also conflict with 'gb-vendor' fetches of other repositories.

I suggest adding something like '-clone' option for 'gb-vendor fetch', that would get registered in the manifest. The repository would simply get cloned. In case of an update, simply failing if the vendored repository is not clean seems ok.

Since gb-vendor is already doing the job of cloning a repo and branch tracking, it might be quite easy to implement.

@davecheney
Copy link
Contributor

All the logic is there in the manifest format to implement this. It's on
the backlog, but not near the tip. If you want to tackle it, I'd welcome
the assistance.

On Fri, 21 Aug 2015 22:55 Victor Starodub notifications@github.com wrote:

It would be convenient to be able to optionally clone vendored paths as
proper repositories.

Use scenario:
I've got project repo and a shared repo. I'm developing a feature in the
project repo and need to add some supporting code to the shared repo. I
want able to write/test/commit the supporting code inside the "vendor/" dir.

Currently with gb, it looks like I've got following options:

  1. Manually copy changed files to a separately cloned repo to be able to
    commit them. This is quite tedious.
  2. Don't use gb-vendor for the shared repo. Clone a repo into the vendor
    dir. This essentially means using two separate vendoring mechanisms, e.g.
    using git submodule in addition to gb. It might also conflict with
    'gb-vendor' fetches of other repositories.

I suggest adding something like '-clone' option for 'gb-vendor fetch',
that would get registered in the manifest. The repository would simply get
cloned. In case of an update, simply failing if the vendored repository is
not clean seems ok.

Since gb-vendor is already doing the job of cloning a repo and branch
tracking, it might be quite easy to implement.


Reply to this email directly or view it on GitHub
#316.

@vstarodub
Copy link
Author

Sure, I'll give it a try.

@davecheney
Copy link
Contributor

The trick is to use the prefix field of the manifest to strip out the import path prefix that TV projects have.

On 21 Aug 2015, at 23:34, Victor Starodub notifications@github.com wrote:

Sure, I'll give it a try.


Reply to this email directly or view it on GitHub.

@davidkaya
Copy link
Contributor

@davecheney Hey! I am back (after a looong time)! I can implement this, but I didn't quite get the "prefix" that you are talking about Dave.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants