Skip to content

Add filter to git hook (dev qol)#85159

Merged
joaomoreno merged 3 commits intomicrosoft:masterfrom
anthonydresser:githook
Nov 29, 2019
Merged

Add filter to git hook (dev qol)#85159
joaomoreno merged 3 commits intomicrosoft:masterfrom
anthonydresser:githook

Conversation

@anthonydresser
Copy link
Contributor

Currently the git hook takes every change you have and starts the filter from there and bypasses the "all" filter.

This changes it so the files from the git hook are filtered through "all" first.

I considered adding the filter at https://github.com/microsoft/vscode/blob/master/build/gulpfile.hygiene.js#L332 instead, but this seems like a more targeted fix.

@joaomoreno joaomoreno added the git GIT issues label Nov 21, 2019
@joaomoreno
Copy link
Member

Actually, since one can also invoke gulpfile.hygiene.js as a standalone script, it would be better to have the fix up there instead, such that files passed in such a way also run through the all filter. What do you think?

@anthonydresser
Copy link
Contributor Author

I was also thinking that, but I wasn't sure if there was a scenario where we would want to just hygiene exactly what the caller passed (i.e it was intentional to pass in a file not listed by the all filter). But I generally agree that it would make more sense just to filter everything that goes through hygiene.

@anthonydresser
Copy link
Contributor Author

@joaomoreno I've updated it to filter everything passed into the hygiene task, let me know what you think.

@joaomoreno
Copy link
Member

Excellent, thanks! 🎆

@joaomoreno joaomoreno added this to the November 2019 milestone Nov 29, 2019
@joaomoreno joaomoreno merged commit b157e4d into microsoft:master Nov 29, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

git GIT issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants