Skip to content

fix(ng-dev): uncommitted changes check returning false-positives #416

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

Merged

Conversation

devversion
Copy link
Member

@devversion devversion commented Feb 20, 2022

In some cases the hasUncommittedChanges check returns false-positives
that occur due to us not refreshing & cleaning up the index before diffing
the index. The index needs a cleanup/refresh when a file is simply touched/modified with the actual content not changing. i.e. just the last modified time got updated.

More details: https://stackoverflow.com/questions/34807971/why-does-git-diff-index-head-result-change-for-touched-files-after-git-diff-or-g/34808299#34808299

In some cases the `hasUncommittedChanges` check returns false-positives
that occur due to us not refreshing & cleaning up the index before diffing
the index. The diff needs a cleanup/refresh when a file is simply modified
but did change the actual content.

More details: https://stackoverflow.com/questions/34807971/why-does-git-diff-index-head-result-change-for-touched-files-after-git-diff-or-g/34808299#34808299
@devversion devversion requested a review from crisbeto February 20, 2022 16:31
@devversion devversion added the action: review The PR is still awaiting reviews from at least one requested reviewer label Feb 20, 2022
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@devversion
Copy link
Member Author

I fixed up the PR description since it read a little weird. Just FYI

@devversion devversion merged commit a9c4860 into angular:main Feb 20, 2022
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: review The PR is still awaiting reviews from at least one requested reviewer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants