I edit files running Git with Emacs 23.3.1 / TRAMP / VC sudoed via an ssh connection ( /sudo: sudouser@host :file with tramp-default-proxies-alist set accordingly). sudouser is a shared account, so I don't want to set user.email / user.name globally, but use GIT_AUTHOR_NAME / GIT_AUTHOR_EMAIL / GIT_COMMITTER_NAME / GIT_COMMITTER_EMAIL to set it only for my connection.
I did not find a way to install the environment / change the command in vc-git . Adding environment variables to tramp-remote-process-environment :
(add-to-list 'tramp-remote-process-environment " GIT_AUTHOR_EMAIL=tim@tim-landscheidt.de ") (add-to-list 'tramp-remote-process-environment "GIT_AUTHOR_NAME='Tim Landscheidt'") (add-to-list 'tramp-remote-process-environment " GIT_COMMITTER_EMAIL=tim@tim-landscheidt.de ") (add-to-list 'tramp-remote-process-environment "GIT_COMMITTER_EMAIL='Tim Landscheidt'")
it works, but I'm afraid it might bite me in the future when I want to work on a host where I need a different personality.
Is there a way to set another author / committer limited to one TRAMP connection?
source share