diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2010-03-12 17:16:42 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2010-03-12 17:17:07 -0500 |
commit | b7415cf4c6d20cc6d7164caafc201933fe8ffd29 (patch) | |
tree | b0d8a99779d4f31ceee238c32a231ddb77f9ce0e /commit.d/50vcs-commit | |
parent | bf4a93ca53cb2bd463ad553d13f4e988e26fe35f (diff) |
darcs cleanup
* Changed darcs to specify --author instead of noting the committing
user inside the commit log.
* Add -a to DARCS_COMMIT_OPTIONS so commits are noninteractive by default,
but users who want darcs prompting can disable it.
* Use darcs record -m to specify commit message, instead of using a logfile.
Diffstat (limited to 'commit.d/50vcs-commit')
-rwxr-xr-x | commit.d/50vcs-commit | 11 |
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 |