Skip to content

Conversation

@weitsai
Copy link

@weitsai weitsai commented Dec 18, 2025

Summary

  • Add -- separator to git diff HEAD command in commit-commands plugin

Problem

The current implementation uses git diff HEAD without the -- separator. This can cause issues when a file named HEAD exists in the working directory, as git may interpret it ambiguously.

Solution

Changed git diff HEAD to git diff HEAD -- to explicitly separate revision arguments from file paths, following git best practices.

Test plan

  • Verify the commit command still works correctly
  • Test with a file named "HEAD" in the working directory to confirm the fix

Add the -- separator to 'git diff HEAD' command to prevent ambiguity
when a file named 'HEAD' exists in the working directory. This follows
git best practices for separating revision arguments from file paths.
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.

1 participant