-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Do not use user defined templateDir and hooksDir #7923
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
Do not use user defined templateDir and hooksDir #7923
Conversation
3720b63
to
3c375ad
Compare
Maybe we should set |
@josevalim this will only ignore system-wide git configuration, not user-wide one. |
lib/mix/lib/mix/scm/git.ex
Outdated
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.
I don't think we need to pass core.hooksPath
here.
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.
Maybe we should pass --template ""
as there is also a GIT_TEMPLATE_DIR
environment variable that this configuration won't override.
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.
I just fixed this one everywhere as I am personally using this option (I do not use init.templateDir
though) and thanks to that most of output from my global hooks disappeared. Maybe in this particular case it isn't needed, but I think we should keep it for consistency.
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.
If it isn't needed, then we shouldn't keep it. I don't think consistency here matters. Different commands, different options.
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.
@josevalim it is needed as there is checkout
later, which will fire hook (post-checkout
).
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.
@hauleth and did you look into setting --templates=""
instead here and below?
As the documentation for the variable suggested, we would need to set that and the HOME variable to avoid all configs. But I actually don't think that is a good idea since SSH configuration goes in the config files and we need that. :) |
lib/mix/lib/mix/scm/git.ex
Outdated
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.
Which hooks are invoked on remote add origin
?
lib/mix/lib/mix/scm/git.ex
Outdated
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.
You removed the --git-dir configuration from this previous command.
Ping! |
@josevalim I will finish this later as I had other tasks today (in and out of work). Sorry |
Ping :D |
This can cause problems with some user configurations as such flags can introduce unwanted output/behaviour in some test cases.
027011c
to
6f48a16
Compare
@josevalim updated |
❤️ 💚 💙 💛 💜 |
This can cause problems with some user configurations as such flags can
introduce unwanted output/behaviour in some test cases.