Skip to content

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

Open
jcchavezs wants to merge 1 commit intokassett:mainfrom
jcchavezs:162_force_push
Open

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

Conversation

@jcchavezs
Copy link
Copy Markdown

@jcchavezs jcchavezs commented Oct 1, 2025

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

Fixes #162

cc @kassett

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

Signed-off-by: José Carlos Chávez <jcchavezs@gmail.com>
},
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,.

}

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

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