Skydio / revup

Effortlessly create and manage pull requests without changing branches. Powers a stacked diffs workflow with python and git "plumbing" commands.
https://github.com/Skydio/revup
MIT License
309 stars 59 forks source link

revup modifies the git commit in ways that doesn't take commit.cleanup into mind #148

Closed ankurcha closed 6 months ago

ankurcha commented 6 months ago

Describe the bug My gitconfig has the following part

[commit]
  template = ~/.gitcommit.template
  cleanup = scissors

The template is a markdown file that is used to format the commit message. The code here https://github.com/Skydio/revup/blob/main/revup/amend.py#L47 strips all # prefixed lines.

Expected behavior

To Reproduce

  1. Set git config commit.cleanup=scissors
  2. Add a git commit message with markdown (add a heading with # in the start) git commit -a
  3. Confirm that the markdown is present as entered by the user git log
  4. Run revup amend and close the editor without any changes
  5. Check git message git log

# prefixed lines are removed.

Logs Terminal output from the command. If possible, rerun the command with revup -v to get more verbose logs.

jerry-skydio commented 6 months ago

thanks for the report. i've added some changes to respect the cleanup and commentChar options in config