diff options
author | Calvin Behling <calvin.behling@gmail.com> | 2016-05-07 17:34:52 -0500 |
---|---|---|
committer | Calvin Behling <calvin.behling@gmail.com> | 2016-05-07 17:58:46 -0500 |
commit | 4cd57d7c5d2f05724c042d5bb8e83faf96638156 (patch) | |
tree | dc8dff2497fc3a4724aecff5a909f33b344347d2 /tree_test.go | |
parent | 36d14454b32eca89ac43d2934c50f3a1ae2e1d20 (diff) | |
download | go-git-4cd57d7c5d2f05724c042d5bb8e83faf96638156.tar.gz |
Fix PullDefault to not cause panics.
The `remote.upInfo` is not set until `Connect()` is called.
However, `repository.PullDefault()` requires that it exists when
it calls `remote.DefaultBranch()`. This can be solved by pushing
the default branch discovery into `repository.Pull()`.
The empty string "" is not a valid branch name, so by allowing
the empty string to mean 'default branch' in the `Pull()` function
we can allow `PullDefault()` to not need a `remote.Connect()` call
before calling `repository.Pull()`
Diffstat (limited to 'tree_test.go')
0 files changed, 0 insertions, 0 deletions