diff options
author | Joey Hess <joey@kitenet.net> | 2010-05-28 14:02:42 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-05-28 14:02:42 -0400 |
commit | f3abbd64b8f94d105ee077a63774cd596c797a03 (patch) | |
tree | 312f9920df6fa9849700dc8717c09135e490df53 | |
parent | 4b71c1b08107c4d0d8ce09950b785458d6c3283b (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.
-rwxr-xr-x | commit.d/50vcs-commit | 9 | ||||
-rw-r--r-- | debian/changelog | 3 |
2 files changed, 7 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 diff --git a/debian/changelog b/debian/changelog index b4a12a1..7ed62bb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,9 @@ etckeeper (0.47) UNRELEASED; urgency=low user home directory when sudo etckeeper is run. Closes: #583581 * hg: Set HGUSER (if not already set) to avoid warning message when committing. Closes: #533298 + * 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. -- Joey Hess <joeyh@debian.org> Fri, 28 May 2010 13:33:44 -0400 |