summaryrefslogtreecommitdiff
path: root/commit.d/50vcs-commit
diff options
context:
space:
mode:
Diffstat (limited to 'commit.d/50vcs-commit')
-rwxr-xr-xcommit.d/50vcs-commit11
1 files changed, 6 insertions, 5 deletions
diff --git a/commit.d/50vcs-commit b/commit.d/50vcs-commit
index 6cc0307..c726167 100755
--- a/commit.d/50vcs-commit
+++ b/commit.d/50vcs-commit
@@ -45,12 +45,13 @@ 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)"
- printf "%b" "$message" > "$logfile"
if [ -n "$USER" ]; then
- echo "(committed by $USER)" >> "$logfile"
+ USER=root
+ fi
+ if [ -n "$message" ]; then
+ darcs record --author="$USER" $DARCS_COMMIT_OPTIONS -m "$message"
+ else
+ darcs record --author="$USER" $DARCS_COMMIT_OPTIONS
fi
- darcs record $DARCS_COMMIT_OPTIONS --logfile="$logfile"
- rm -f "$logfile"
unset logfile
fi