Frédéric Brière wrote: > The latest release of etckeeper makes sudo-based Git commits authorship > worse for me, for two reasons: > > - My full name and email are defined in ~/.gitconfig, but etckeeper now > sets $HOME to ~root.
I did consider this before making the change. I don't plan to revert it; my reasons are: 1. Git could start writing to the user's home directory like bzr does at any point. It's best to have etckeeper treat the VCCs consistently. 2. Root should be able to set up ~/.gitconfig and have the configuration be used. 3. etckeeper repos are inherently bound to a machine, and typically kept local, so it's generally fine for them not to have a pretty email address in them. u...@host is fine if you're on $host and know who $user is. > - $GIT_AUTHOR_NAME/EMAIL are defined unconditionally, making it > impossible to override them. I'm not really sure what the use case is for using them with etckeeper? They will be cleared across the sudo boundary anyway. > On the second point, you probably want to do test something like: > > [ -z "$GIT_AUTHOR_NAME" ] && ! git config --get user.name > /dev/null > > [ -z "$GIT_AUTHOR_EMAIL" ] && ! git config --get user.email > /dev/null It does not make sense to check git config, because then if root has a ~/.gitconfig, it would override the information of who used sudo to make the commit, which is almost certianly not desired. -- see shy jo
signature.asc
Description: Digital signature