Skip to content

New retry_after_failure config option and --no-retry overwrite flag #732

Closed
@crai0

Description

@crai0

Description

In order to allow for a streamlined commit-fix-commit cycle when using git hooks or pre-commit, an option to automatically reuse the last commit message if the commit failed should be added.

Possible Solution

  • There's a new retry_after_failure config option
  • By default, it is set to false
  • If it is set to true, cz commit reuses the commit message from the backup file if it is present
  • If the backup file is not present, the usual behavior is carried out
  • There's a new --no-retry option to overwrite the config (e.g. running cz commit --no-retry behaves as if retry_after_failure were set to false)
  • The current retry implementation is improved so that the backup file is written to a path that depends on the current user and git working tree directory. This allows for the usage of --retry when working in multiple repositories simultaneously

Additional context

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions