We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f5ec7d9 commit 80a6a3aCopy full SHA for 80a6a3a
tools/git/hooks/pre-push
@@ -48,11 +48,11 @@ has_commits() {
48
if git branch -r | grep "${GIT_CURRENT_BRANCH}" > /dev/null; then
49
echo 'Remote branch exists.' >&2
50
echo 'Checking for commits to push...' >&2
51
- commits=$(git log origin/"${GIT_CURRENT_BRANCH}".."${GIT_CURRENT_BRANCH}" -- --oneline)
+ commits=$(git log origin/"${GIT_CURRENT_BRANCH}".."${GIT_CURRENT_BRANCH}" --oneline --)
52
else
53
echo 'Remote branch does not exist.' >&2
54
55
- commits=$(git log "${GIT_CURRENT_BRANCH}" -- --oneline)
+ commits=$(git log "${GIT_CURRENT_BRANCH}" --oneline --)
56
fi
57
if [[ -z "${commits}" ]]; then
58
echo 'No commits to push.'
0 commit comments