|
|
|
@ -11,13 +11,14 @@ A work in progress git command for managing golang vendor dependencies. |
|
|
|
* `git vendor update <dir> <ref>` - update a vendored dependency to `<ref>`. |
|
|
|
|
|
|
|
## Installation |
|
|
|
``` |
|
|
|
```bash |
|
|
|
(wget -O /usr/local/bin/git-vendor https://raw.githubusercontent.com/brettlangdon/git-vendor/master/git-vendor && chmod +x /usr/local/bin/git-vendor) |
|
|
|
``` |
|
|
|
|
|
|
|
## Example |
|
|
|
Checkout `github.com/brettlangdon/forge@v0.1.6` under `vendor/github.com/brettlangdon/forge` |
|
|
|
``` |
|
|
|
|
|
|
|
```bash |
|
|
|
$ # Checkout github.com/brettlangdon/forge@v0.1.6 under vendor/github.com/brettlangdon/forge |
|
|
|
$ git vendor add https://github.com/brettlangdon/forge v0.1.6 |
|
|
|
git fetch https://github.com/brettlangdon/forge v0.1.6 |
|
|
|
warning: no common commits |
|
|
|
@ -28,10 +29,7 @@ Resolving deltas: 100% (227/227), done. |
|
|
|
From https://github.com/brettlangdon/forge |
|
|
|
* tag v0.1.6 -> FETCH_HEAD |
|
|
|
Added dir 'vendor/github.com/brettlangdon/forge' |
|
|
|
``` |
|
|
|
|
|
|
|
List current vendored dependencies |
|
|
|
``` |
|
|
|
$ # List current vendored dependencies |
|
|
|
$ git vendor list |
|
|
|
vendor/github.com/brettlangdon/forge |
|
|
|
commit: a7afbba3821d74c5b722c9195b954effa3d7420f |
|
|
|
@ -39,10 +37,7 @@ vendor/github.com/brettlangdon/forge |
|
|
|
ref: v0.1.6 |
|
|
|
repo: https://github.com/brettlangdon/forge |
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
Update existing dependency to a newer version |
|
|
|
``` |
|
|
|
$ # Update existing dependency to a newer version |
|
|
|
$ git vendor update vendor/github.com/brettlangdon/forge v0.1.7 |
|
|
|
warning: no common commits |
|
|
|
remote: Counting objects: 411, done. |
|
|
|
@ -56,10 +51,7 @@ Merge made by the 'recursive' strategy. |
|
|
|
vendor/github.com/brettlangdon/forge/scanner.go | 4 ++++ |
|
|
|
vendor/github.com/brettlangdon/forge/test.cfg | 1 + |
|
|
|
3 files changed, 7 insertions(+) |
|
|
|
``` |
|
|
|
|
|
|
|
List current vendored dependencies |
|
|
|
``` |
|
|
|
$ # List current vendored dependencies |
|
|
|
$ git vendor list |
|
|
|
vendor/github.com/brettlangdon/forge |
|
|
|
commit: fcaa3c0cf3792fe3ad724c43d6db75f06fc5ecd5 |
|
|
|
|