summaryrefslogtreecommitdiff
path: root/checkout.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-22 16:58:20 -0500
committerJeff Carr <[email protected]>2025-09-22 16:58:20 -0500
commit540eadaa967c4d981b2ef896a67587a2674ccd48 (patch)
tree0ade39fca8fb4b8ccd974c7a80d48e112e073d1e /checkout.go
parentab666ddbc382707f598613405ef4fe4755d34fce (diff)
add RunPipe()v0.0.131
Diffstat (limited to 'checkout.go')
-rw-r--r--checkout.go6
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