rhysd / committia.vim

A Vim plugin for more pleasant editing on commit messages
MIT License
731 stars 30 forks source link

fix behavior of `git-status` after committing #63

Closed ogaken-1 closed 1 year ago

ogaken-1 commented 1 year ago

The value returned by the git status command varies depending on whether $GIT_INDEX_FILE is an empty string or undefined.

Sorry, I could not find any documentation that defines this behavior.

mopp commented 1 year ago

@rhysd I faced the same issue and I confirmed this PR fixes it. Please review and merge!

What we faced

The result of git status includes all files in the git repo.

You can reproduce the behavior without vim.

export GIT_INDEX_FILE=''
git status
rhysd commented 1 year ago

Thanks for elaborate on that. I understood what was going wrong and this patch looks good to fix the issue.