aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-03-29 14:09:25 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-03-29 14:09:25 +0200
commitf20f8ab371ad2cd8d49a9eddad1c967aed81572c (patch)
treecc3a71371395ccde8005ee72ea88ebfb17b9196d
parent04d01064e5e9051b756b20e87769208dda58e9d7 (diff)
downloadgit-merge-pr-f20f8ab371ad2cd8d49a9eddad1c967aed81572c.tar.gz
git-merge-pr-f20f8ab371ad2cd8d49a9eddad1c967aed81572c.tar.xz
git-merge-pr-f20f8ab371ad2cd8d49a9eddad1c967aed81572c.zip
simplify using git interpret-trailer's new --in-place option
-rw-r--r--README.md2
-rwxr-xr-xgit-merge-pr5
2 files changed, 3 insertions, 4 deletions
diff --git a/README.md b/README.md
index f4e07f9..626b1eb 100644
--- a/README.md
+++ b/README.md
@@ -27,7 +27,7 @@ Useful `git am` flags:
## Requirements
-* Git 2.2.0 or newer
+* Git 2.8.0 or newer
* wget
* jq (only for listing pull requests)
diff --git a/git-merge-pr b/git-merge-pr
index 464f5f6..e6f0e5d 100755
--- a/git-merge-pr
+++ b/git-merge-pr
@@ -37,7 +37,6 @@ if [ "$(git config --bool --get merge-pr.autoclose)" = false ]; then
fi
# Rewrite last commit message to close GitHub issue.
-GIT_EDITOR='sh -c '\''git -c trailer.closes.ifExists=replace interpret-trailers \
- --trailer "Closes: #'"$PR"' [via git-merge-pr]" "$1" > "$1-" &&
- mv "$1-" "$1"'\'' -' \
+GIT_EDITOR="git -c trailer.closes.ifExists=replace interpret-trailers \
+ --trailer 'Closes: #$PR [via git-merge-pr]' --in-place" \
git commit --quiet --amend