summaryrefslogtreecommitdiff
path: root/commit.d/50vcs-commit
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-05-28 14:02:42 -0400
committerJoey Hess <joey@kitenet.net>2010-05-28 14:02:42 -0400
commitf3abbd64b8f94d105ee077a63774cd596c797a03 (patch)
tree312f9920df6fa9849700dc8717c09135e490df53 /commit.d/50vcs-commit
parent4b71c1b08107c4d0d8ce09950b785458d6c3283b (diff)
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.
Diffstat (limited to 'commit.d/50vcs-commit')
-rwxr-xr-xcommit.d/50vcs-commit9
1 files changed, 4 insertions, 5 deletions
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 <root@$hostname>"'
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