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

Ensure watch (d)iff command finds staged files #18

Merged
merged 1 commit into from
Feb 25, 2024
Merged

Conversation

mattbrictson
Copy link
Owner

Previously, when "d" was pressed in watch mode, we were using git ls-files to find the list of new and modified files. If a file was modified but staged/cached (i.e. it was added with git add but not yet committed), it would not be detected.

This commit changes the diff implementation to use git status instead, which lists both staged and un-staged changes.

Previously, when "d" was pressed in watch mode, we were using
`git ls-files` to find the list of new and modified files. If a file was
modified but staged/cached (i.e. it was added with `git add` but not yet
committed), it would not be detected.

This commit changes the diff implementation to use `git status` instead,
which lists both staged and un-staged changes.
@mattbrictson mattbrictson added the 🐛 Bug Fix Fixes a bug label Feb 25, 2024
@mattbrictson mattbrictson merged commit 2943fb5 into main Feb 25, 2024
6 checks passed
@mattbrictson mattbrictson deleted the git-status branch February 25, 2024 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Fix Fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant