summaryrefslogtreecommitdiff
path: root/commit.d/50vcs-commit
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2010-02-18 13:55:17 -0500
committerJoey Hess <joey@gnu.kitenet.net>2010-02-18 13:55:17 -0500
commit75b584a6f60fddaa341ad00abb0ecc9ed8adf822 (patch)
treeddbac5f35196b558ae653f0b897e3646a9b2c7b6 /commit.d/50vcs-commit
parent44605209926fb47671f298073fa31d2631e5a540 (diff)
Record real committer username in the darcs log, so that the man page can say that for every VCS the username is recorded.
Diffstat (limited to 'commit.d/50vcs-commit')
-rwxr-xr-xcommit.d/50vcs-commit5
1 files changed, 4 insertions, 1 deletions
diff --git a/commit.d/50vcs-commit b/commit.d/50vcs-commit
index 8a1ce3f..6cc0307 100755
--- a/commit.d/50vcs-commit
+++ b/commit.d/50vcs-commit
@@ -45,8 +45,11 @@ elif [ "$VCS" = bzr ] && [ -d .bzr ]; then
bzr commit "$BZR_AUTHOR" $BZR_COMMIT_OPTIONS
fi
elif [ "$VCS" = darcs ] && [ -d _darcs ]; then
- logfile="$( mktemp -t etckeeper-$VCS.XXXXXXXXXX )"
+ logfile="$(mktemp -t etckeeper-$VCS.XXXXXXXXXX)"
printf "%b" "$message" > "$logfile"
+ if [ -n "$USER" ]; then
+ echo "(committed by $USER)" >> "$logfile"
+ fi
darcs record $DARCS_COMMIT_OPTIONS --logfile="$logfile"
rm -f "$logfile"
unset logfile