-
Notifications
You must be signed in to change notification settings - Fork 251
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
Verifying that new generated files are added to git. #2843
Verifying that new generated files are added to git. #2843
Conversation
✅ Deploy Preview for kubernetes-sigs-kueue ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
/cc @alculquicondor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
LGTM label has been added. Git tree hash: 7b68f4fe54d0431674eaf7d3c3d69339dd18c892
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alculquicondor, mbobrovskyi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
git --no-pager diff --exit-code $(PATHS_TO_VERIFY) | ||
if git ls-files --exclude-standard --others $(PATHS_TO_VERIFY) | grep -q . ; then exit 1; fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git --no-pager diff --exit-code $(PATHS_TO_VERIFY) | |
if git ls-files --exclude-standard --others $(PATHS_TO_VERIFY) | grep -q . ; then exit 1; fi | |
git --no-pager diff --exit-code $(PATHS_TO_VERIFY) | |
git --cashed --no-pager diff --exit-code $(PATHS_TO_VERIFY) |
Instead of ls-files
command, couldn't we check just staged files like this, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--cached
flag doesn't allow to check not added to git files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's right. So, I added 2 commands, git diif
and git diff --cached
as you can see above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be sure I didn't got how it can help.
git diff: It shows only those changes of tracked files which are present in working directory.
git diff --cached: It shows only those changes of tracked files which are present in staging area.
But we are looking solution to show untracked files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, let's revisit here once we face the same error.
Thank you for investigating.
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
We need to make sure all generated files are added to git.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Here is discussion about that.
Does this PR introduce a user-facing change?