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

commit --amend bindings needs --allow-empty #2378

Closed

Conversation

KSR-Yasuda
Copy link
Contributor

Shouldn't it set --allow-empty option for commit --amend bindings such as ca,
while cW binding or commit --fixup=reword has been introduced?

Otherwise, amending such rewording commits by ca fails.

@tpope
Copy link
Owner

tpope commented Feb 17, 2025

Otherwise, amending such rewording commits by ca fails.

The reason git requires --allow-empty is to make sure empty commits are deliberate. It's impossible to create an empty commit by accident. I'm not going to remove that protection to address one narrow edge case.

@tpope tpope closed this Feb 17, 2025
@KSR-Yasuda KSR-Yasuda deleted the feature/CommitAmendAllowEmpty branch February 17, 2025 05:56
@KSR-Yasuda
Copy link
Contributor Author

Okay, thank you.

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.

2 participants