tools / godep

dependency tool for go
http://godoc.org/github.com/tools/godep
BSD 3-Clause "New" or "Revised" License
5.54k stars 454 forks source link

handle detached git on restore #464

Closed freeformz closed 8 years ago

freeformz commented 8 years ago

If the git repo is detached, we need to determine the default remote branch before attempting to donwload (can't pull into a repo in detached state).

This attempts to use "git remote show origin" to have the origin tell us what the default branch is.

PS: this may not work with old (~3 year old git servers).

freeformz commented 8 years ago

This is because of this: https://github.com/golang/go/commit/42206598671a44111c8f726ad33dc7b265bdf669

This doesn't "fix" anything for non godep users, just allows godep restore to work properly.

freeformz commented 8 years ago

This came up in #453