Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --edit flag #5

Closed
alicederyn opened this issue Jan 24, 2022 · 0 comments · Fixed by #36
Closed

Add --edit flag #5

alicederyn opened this issue Jan 24, 2022 · 0 comments · Fixed by #36
Labels
enhancement New feature or request

Comments

@alicederyn
Copy link
Owner

alicederyn commented Jan 24, 2022

The following should be valid commands:

  • git rex --edit COMMIT — Opens the commit message of COMMIT in an editor prior to executing the script, similar to git cherry-pick --edit
  • git rex --edit — Opens a template commit message in an editor; executes the user-supplied script and commits.

Both will need to implement the behaviour of the git commit --cleanup flag prior to executing the script. Optionally, we could add a new default mode that does not ignore comments in script sections, as that's probably going to be pretty convenient.

Automated commit created with git-rex

The following commands were executed:

```bash
# Enter your script here. It will be executed, and all files created
# or changed committed to your repository.
```

# Please enter the commit message for your changes. Lines starting
# with '#', except those in script sections, will be ignored, and an
# empty commit message, or one with no script commands to execute,
# aborts the commit.
#
# On branch foo

Both should respect the core.editor config, if set.

@alicederyn alicederyn added the enhancement New feature or request label Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant