diff options
Diffstat (limited to 'checkout.go')
| -rw-r--r-- | checkout.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/checkout.go b/checkout.go index edc508a..18253b7 100644 --- a/checkout.go +++ b/checkout.go @@ -81,7 +81,11 @@ func (repo *Repo) checkoutBranch(bName string) bool { func (repo *Repo) createUserBranch(branch string) error { if branch == "" { // get the username here? - return fmt.Errorf("gitpb createuserBranch() logic err. git branch name can not be blank") + usr, err := user.Current() + if err != nil { + return err + } + branch = usr.Username } if repo.IsDirty() { // never change repos on dirty branches |
