Skip to content

Conversation

hauleth
Copy link
Contributor

@hauleth hauleth commented Jul 17, 2018

This can cause problems with some user configurations as such flags can
introduce unwanted output/behaviour in some test cases.

@hauleth hauleth force-pushed the do-not-use-user-gitconfig-template-and-hooks branch from 3720b63 to 3c375ad Compare July 17, 2018 23:26
@josevalim
Copy link
Member

Maybe we should set GIT_CONFIG_NOSYSTEM instead?

@hauleth
Copy link
Contributor Author

hauleth commented Jul 17, 2018

@josevalim this will only ignore system-wide git configuration, not user-wide one.

Copy link
Member

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.

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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).

Copy link
Member

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?

@josevalim
Copy link
Member

@josevalim this will only ignore system-wide git configuration, not user-wide one.

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. :)

Copy link
Member

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?

Copy link
Member

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.

@josevalim
Copy link
Member

Ping!

@hauleth
Copy link
Contributor Author

hauleth commented Jul 19, 2018

@josevalim I will finish this later as I had other tasks today (in and out of work). Sorry

@josevalim
Copy link
Member

Ping :D

This can cause problems with some user configurations as such flags can
introduce unwanted output/behaviour in some test cases.
@hauleth hauleth force-pushed the do-not-use-user-gitconfig-template-and-hooks branch from 027011c to 6f48a16 Compare August 17, 2018 11:23
@hauleth
Copy link
Contributor Author

hauleth commented Aug 17, 2018

@josevalim updated

@josevalim josevalim merged commit f103853 into elixir-lang:master Aug 29, 2018
@josevalim
Copy link
Member

❤️ 💚 💙 💛 💜

@hauleth hauleth deleted the do-not-use-user-gitconfig-template-and-hooks branch August 29, 2018 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants