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

FIX Only use git diff #7

Merged

Conversation

emteknetnz
Copy link
Member

@GuySartorelli GuySartorelli merged commit ddba039 into silverstripe:1.0 Jul 19, 2022
@GuySartorelli GuySartorelli deleted the pulls/1.0/git-diff-cached branch July 19, 2022 04:10
echo "git diff files:"
echo $GIT_DIFF_FILES
fi
git add .
Copy link

Choose a reason for hiding this comment

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

Why run the git add command? git diff will reveal changes that are not staged, git diff --cached will show diffs for those that are...

but if you're running both git diff and git diff --cached then what's the need to stage any changes?

Copy link
Member Author

@emteknetnz emteknetnz Jul 20, 2022

Choose a reason for hiding this comment

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

In case there were any dist files that for whatever reason were previously deleted and committed. When rebuilding the dist files we need to git add them for them to show, otherwise they're untracked.

Probably don't need both git diff and git diff --cached though, but it's harmless

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants