Skip to content

feat: implements the --base-commit and --allow-fast-forward flags#355

Open
jcchavezs wants to merge 1 commit into
kassett:mainfrom
jcchavezs:162_force_push
Open

feat: implements the --base-commit and --allow-fast-forward flags#355
jcchavezs wants to merge 1 commit into
kassett:mainfrom
jcchavezs:162_force_push

Conversation

@jcchavezs

@jcchavezs jcchavezs commented Oct 1, 2025

Copy link
Copy Markdown

to be able to simulate a push force when creating a new commit

Fixes #162

cc @kassett

Comment thread cmd/args.go
},
RunE: func(cmd *cobra.Command, args []string) error {

cmd.SilenceUsage = true

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If an error occurs here, showing the usage is too much noise, hence silencing it. Notice in PreRunE we can still show the usage as it makes sense,.

Comment thread cmd/gh.go
}

if allowFastForward {
body["force"] = true

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jcchavezs

Copy link
Copy Markdown
Author

Ping @kassett

…be able to simulate a push force when creating a new commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rewrite the branch

1 participant