aboutsummaryrefslogtreecommitdiffstats
path: root/blame.go
diff options
context:
space:
mode:
authorCalvin Behling <calvin.behling@gmail.com>2016-05-07 17:34:52 -0500
committerCalvin Behling <calvin.behling@gmail.com>2016-05-07 17:58:46 -0500
commit4cd57d7c5d2f05724c042d5bb8e83faf96638156 (patch)
treedc8dff2497fc3a4724aecff5a909f33b344347d2 /blame.go
parent36d14454b32eca89ac43d2934c50f3a1ae2e1d20 (diff)
downloadgo-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 'blame.go')
0 files changed, 0 insertions, 0 deletions