Everduin94 / better-commits

A CLI for creating better commits following the conventional commits specification
MIT License
1.96k stars 69 forks source link

Renaming file without changes results in "no changes to commit" #60

Closed davidsneighbour closed 8 months ago

davidsneighbour commented 9 months ago
❯ git status
On branch feat/productpage
Your branch is up to date with 'origin/feat/productpage'.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        renamed:    content/en/products.md -> content/en/pricing.md

[15:04:11][patrick@Behemoth]~/gitlab.com/wonderland/wonderland-engine-website(+1|%0|ok)
❯ 

followed by better-commit:

┌   better-commits 
│
◇  Found global config
│
◇   Checking Git Status 
│
◆  Changes to be committed:
│  
│
■  no changes added to commit (use "git add" and/or "git commit -a")
Everduin94 commented 9 months ago

@davidsneighbour - Hey thanks for reporting. This is a somewhat known issue (not the exact case but is caused by the same source). I plan to fix this via https://github.com/Everduin94/better-commits/issues/56.

Basically, we need to write our own version of parsing git status. The SimpleGit library makes a up for a lot of the bloat in size of better-commits and is the source various bugs like this.