diff options
-rwxr-xr-x | commit.d/50vcs-commit | 5 | ||||
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | etckeeper.8 | 2 |
3 files changed, 8 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 diff --git a/debian/changelog b/debian/changelog index cf69bc2..d4229db 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,8 @@ etckeeper (0.43) UNRELEASED; urgency=low * Check owner of tty to determine who has su'd to root when committing, based on a patch by Jakov Sosic. * Add apparmor.d/cache/ to default ignores. + * Record real committer username in the darcs log, so that the man page + can say that for every VCS the username is recorded. -- Joey Hess <joeyh@debian.org> Sun, 31 Jan 2010 14:36:44 -0500 diff --git a/etckeeper.8 b/etckeeper.8 index ec65f5b..7c05467 100644 --- a/etckeeper.8 +++ b/etckeeper.8 @@ -21,6 +21,8 @@ initialise a clone of the /etc repository located elsewhere. .B commit [message] Commits all changes in /etc to the repository. A commit message can be specified. You may also use the underlying VCS to commit manually. +(Note that etckeeper commit will notice if a user has used sudo or su to +become root, and record the original username in the commit.) .TP .B pre-commit This is called as a pre-commit hook. It stores metadata and does sanity |