mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
Fix git-changelog to handle whitespace in command arguments (#1232)
This commit is contained in:
parent
967e339f91
commit
65dd36ae62
|
|
@ -9,6 +9,15 @@ GIT_MERGELOG_FORMAT="$(git config changelog.mergeformat)"
|
|||
GIT_EDITOR="$(git var GIT_EDITOR)"
|
||||
PROGNAME="git-changelog"
|
||||
|
||||
git_editor() {
|
||||
if test -z "${GIT_EDITOR:+set}"
|
||||
then
|
||||
GIT_EDITOR="$(git var GIT_EDITOR)" || return $?
|
||||
fi
|
||||
|
||||
eval "$GIT_EDITOR" '"$@"'
|
||||
}
|
||||
|
||||
_usage() {
|
||||
cat << EOF
|
||||
usage: $PROGNAME options [file]
|
||||
|
|
@ -574,7 +583,7 @@ main() {
|
|||
rm -f "$tmpfile"
|
||||
|
||||
if [[ -n "$GIT_EDITOR" ]]; then
|
||||
$GIT_EDITOR "$changelog" || _exit
|
||||
git_editor "$changelog" || _exit
|
||||
else
|
||||
less "$changelog" || _exit
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue