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

[NOID] Solves populated git-diff index bug when no changes have happened #553

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

ncordon
Copy link
Collaborator

@ncordon ncordon commented Dec 5, 2023

What

Solves bug in bot to format / update licenses where git diff-index could be returning results even if no files have had updates.

This bug probably is present in the monorepo as I copied those files from there.

Why

For reference the answer to this question https://stackoverflow.com/questions/3878624/how-do-i-programmatically-determine-if-there-are-uncommitted-changes

if there are files that have been touched, but whose contents are the same as in the index, you'll need to run git update-index --refresh before git diff-index, otherwise diff-index will incorrectly report that the tree is dirty)

This is causing the /generateLicenses command to fail when the licenses are all good:

@Lojjs Lojjs self-assigned this Dec 6, 2023
Copy link
Contributor

@Lojjs Lojjs left a comment

Choose a reason for hiding this comment

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

Nice catch, I guess as you are saying that we should do same thing to monorepo too

@ncordon ncordon merged commit 353d39c into dev Dec 7, 2023
21 checks passed
@ncordon ncordon deleted the solves-license-job branch December 7, 2023 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants