himanshub16 / ProxyMan

Configuring proxy settings made easy.
https://github.com/himanshub16/ProxyMan/releases/latest/
MIT License
683 stars 108 forks source link

Git file remove sections instead of unset #75

Closed miguelruizquantion closed 5 years ago

miguelruizquantion commented 5 years ago

--unset http.proxy and --unset https.proxy leaves blanks http and https sections , next time will create again this sections. by --remove-section http or --remove-section https will completely remove seccions leaving .gitconfig file clean for next "proxyman load"

himanshub16 commented 5 years ago

Thanks @miguelruizquantion On my machine (git 2.21), current --unset-proxy removes the section if it is left blank after removing proxy. This should propagate soon in other distros with the appropriate version of git.

Also, checking out at git documentation, I found lot more options for http/https other than proxy. I am not sure if people actually use them, but still --remove-section would remove values one may not want to be removed.

Thoughts?

miguelruizquantion commented 5 years ago

You make a really good point , and as stated in https://stackoverflow.com/questions/15935624/how-do-i-avoid-empty-sections-when-removing-a-setting-from-git-config the bug is fixed and your option is correct.

Thanks for the good job.