Skip to content

Add filter to git hook (dev qol) - #85159

Merged
João Moreno (joaomoreno) merged 3 commits into
microsoft:masterfrom
anthonydresser:githook
Nov 29, 2019
Merged

Add filter to git hook (dev qol)#85159
João Moreno (joaomoreno) merged 3 commits into
microsoft:masterfrom
anthonydresser:githook

Conversation

@anthonydresser

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
Author

João Moreno (@joaomoreno) I've updated it to filter everything passed into the hygiene task, let me know what you think.

@joaomoreno

Copy link
Copy Markdown
Contributor

Excellent, thanks! 🎆

@joaomoreno
João Moreno (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