aboutsummaryrefslogtreecommitdiff
path: root/scripts/git-log-pretty-since.sh
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2022-11-05 22:11:22 +0100
committerGitHub <noreply@github.com>2022-11-05 22:11:22 +0100
commit01ff681f571887fe3ffce90e0df60cf1997e9980 (patch)
tree246ca6b25bc661754971220e5964cb8a885eff5e /scripts/git-log-pretty-since.sh
parent5723b19210b2f3c8f0f20fce541c85b0739c7a3d (diff)
parent502b5ee10fedc97e1455e7365a10c9bad7268c67 (diff)
downloadrneovim-01ff681f571887fe3ffce90e0df60cf1997e9980.tar.gz
rneovim-01ff681f571887fe3ffce90e0df60cf1997e9980.tar.bz2
rneovim-01ff681f571887fe3ffce90e0df60cf1997e9980.zip
Merge pull request #20858 from dundargoc/build/lintsh
build: add more shell scripts to the `lintsh` target
Diffstat (limited to 'scripts/git-log-pretty-since.sh')
-rwxr-xr-xscripts/git-log-pretty-since.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/git-log-pretty-since.sh b/scripts/git-log-pretty-since.sh
index a0aa4354b6..95dcee23f5 100755
--- a/scripts/git-log-pretty-since.sh
+++ b/scripts/git-log-pretty-since.sh
@@ -16,9 +16,9 @@ __SINCE=$1
__INVMATCH=$2
is_merge_commit() {
- git rev-parse $1 >/dev/null 2>&1 \
+ git rev-parse "$1" >/dev/null 2>&1 \
|| { echo "ERROR: invalid commit: $1"; exit 1; }
- git log $1^2 >/dev/null 2>&1 && return 0 || return 1
+ git log "$1"^2 >/dev/null 2>&1 && return 0 || return 1
}
# Removes parens from issue/ticket/PR numbers.
@@ -40,13 +40,13 @@ _format_ticketnums() {
}
for commit in $(git log --format='%H' --first-parent "$__SINCE"..HEAD); do
- if is_merge_commit ${commit} ; then
- if [ -z "$__INVMATCH" ] || ! git log --oneline ${commit}^1..${commit}^2 \
+ if is_merge_commit "${commit}" ; then
+ if [ -z "$__INVMATCH" ] || ! git log --oneline "${commit}^1..${commit}^2" \
| >/dev/null 2>&1 grep -E "$__INVMATCH" ; then
- git log -1 --oneline ${commit}
- git log --format=' %h %s' ${commit}^1..${commit}^2
+ git log -1 --oneline "${commit}"
+ git log --format=' %h %s' "${commit}^1..${commit}^2"
fi
else
- git log -1 --oneline ${commit}
+ git log -1 --oneline "${commit}"
fi
done | _format_ticketnums