Skip to content

Commit

Permalink
fix force-with-lease
Browse files Browse the repository at this point in the history
fixes #70
  • Loading branch information
chriswalz committed Oct 30, 2020
1 parent 6a0b6a7 commit 2969f0b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions cmd/flags_man_pages.go
Original file line number Diff line number Diff line change
Expand Up @@ -1495,8 +1495,7 @@ Transmit the given string to the server, which passes them to the pre-receive as
Path to the git-receive-pack program on the remote end. Sometimes useful when pushing to a remote repository over ssh, and you do not have the program in a directory on the default $PATH.
--[no-]force-with-lease
--force-with-lease=<refname>
--force-with-lease=<refname>:<expect>
--force-with-lease
Usually, "git push" refuses to update a remote ref that is not an ancestor of the local ref used to overwrite it.
This option overrides this restriction if the current value of the remote ref is the expected value. "git push" fails otherwise.
Expand Down
4 changes: 2 additions & 2 deletions cmd/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ func refreshBranch() error {
if err != nil {
return err
}
if strings.TrimSpace(string(msg)) == "Already up to date." {
if strings.Contains(strings.TrimSpace(string(msg)), "up to date") {
return nil
}
log.Debug().Msg("Branch was fast-forwarded")
fmt.Println("Branch was fast-forwarded")
return nil
}

Expand Down

0 comments on commit 2969f0b

Please sign in to comment.