Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

git can support different diff/merge tools. I just wish more of gits configuration could be added to the repo itself. As it is, if you needed a custom merge tool (like UnityYamlMerge) you need each user to configure it separately.

The consequence is every contributor needs to know enough about every file type in the repo to know if a custom merge tool should be add/updated. You might get surprised with a merge conflict in a filetype you never touched if you happen to be the one merging down feature branches.

Hopefully some of this stuff and default client githooks are fixed one day. Seems easy enough to add a "suggested project config" to git.



The problem is those merge tool configurations are all security holes. Also, I get annoyed whenever something (like husky) messes with my git configuration: like editor customizations, I have a certain git workflow and I dislike projects that disrupt it.


Sure, I don't think it should be more than a suggestion you can vet yourself but I would like the process to be automated once approved.


Defining the drivers themselves needs to be done outside the repo as letting the repo run arbitrary commands is a security hole, but which merge/diff drivers appliy to which files can be done in the gitattributes file, and that does work in-repo.


>security hole

Its really not that hard to imagine how you can do this in a secure way. Git has identity and signatures built in. Maybe only updates from trusted users are considered, and you still must agree to the updates, etc etc.

Throwing up our hands and saying its impossible seems like a terrible choice.


If you're going to make me manually agree to the updates, you may as well just have me run a script manually.

I'm not saying it's impossible! I'm saying it's pointless. Trust people set up their own config given tools and instructions, and they might even surprise you by coming up with a better workflow.


Third party tooling could interface with something built in but not the one off scripts people use now. I'm not trying to be draconian here. I just want a built in way to share needed configuration information that we have to special case now.


Third-party tooling already interfaces with hooks/merge config without having to check them in. You put the script that does it in the repo, and you ask users to run the script on checkout.


I want exactly this but with an official format.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: