From f3abbd64b8f94d105ee077a63774cd596c797a03 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 28 May 2010 14:02:42 -0400 Subject: Both git and bzr default to showing the author of a commit, and not the committer. So, set the author to the user running sudo for both. The committer will then be root. --- commit.d/50vcs-commit | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'commit.d/50vcs-commit') diff --git a/commit.d/50vcs-commit b/commit.d/50vcs-commit index 7318a46..45143c3 100755 --- a/commit.d/50vcs-commit +++ b/commit.d/50vcs-commit @@ -37,8 +37,8 @@ fi if [ "$VCS" = git ] && [ -d .git ]; then if [ -n "$USER" ]; then - export GIT_COMMITTER_NAME="$USER" - export GIT_COMMITTER_EMAIL="$USER@$hostname" + export GIT_AUTHOR_NAME="$USER" + export GIT_AUTHOR_EMAIL="$USER@$hostname" fi if [ -n "$logfile" ]; then git commit $GIT_COMMIT_OPTIONS -F "$logfile" @@ -60,12 +60,11 @@ elif [ "$VCS" = hg ] && [ -d .hg ]; then elif [ "$VCS" = bzr ] && [ -d .bzr ]; then if [ -n "$USER" ]; then export EMAIL="$USER <$USER@$hostname>" - BZR_AUTHOR='--author="root "' fi if [ -n "$logfile" ]; then - bzr commit "$BZR_AUTHOR" $BZR_COMMIT_OPTIONS -F "$logfile" + bzr commit $BZR_COMMIT_OPTIONS -F "$logfile" else - bzr commit "$BZR_AUTHOR" $BZR_COMMIT_OPTIONS + bzr commit $BZR_COMMIT_OPTIONS fi elif [ "$VCS" = darcs ] && [ -d _darcs ]; then if [ -z "$USER" ]; then -- cgit v1.2.3