lib/helpers: use `awk` to count lines instead of piping to `wc -l`
Co-authored-by: Kostas Giapis <45879751+tsiflimagas@users.noreply.github.com>pull/1934/head
parent
317ff77810
commit
251e23a3fa
|
|
@ -329,7 +329,7 @@ function _bash-it-update-() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for i in $(git rev-list --merges --first-parent "${revision}"); do
|
for i in $(git rev-list --merges --first-parent "${revision}"); do
|
||||||
num_of_lines=$(git log -1 --format=%B "$i" | awk 'NF' | wc -l)
|
num_of_lines=$(git log -1 --format=%B "$i" | awk '!/^[[:space:]]*$ {++i} END{print i}')
|
||||||
if [[ "$num_of_lines" -eq 1 ]]; then
|
if [[ "$num_of_lines" -eq 1 ]]; then
|
||||||
description="%s"
|
description="%s"
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue