bash-it update: show change log once
parent
2cea663a4a
commit
150f73ee50
|
|
@ -278,7 +278,7 @@ function _bash-it-update-() {
|
||||||
_param '1: What kind of update to do (stable|dev)'
|
_param '1: What kind of update to do (stable|dev)'
|
||||||
_group 'lib'
|
_group 'lib'
|
||||||
|
|
||||||
local silent word DIFF version TARGET revision status revert log_color num_of_lines description i RESP
|
local silent word DIFF version TARGET revision status revert log_color RESP
|
||||||
for word in "$@"; do
|
for word in "$@"; do
|
||||||
if [[ "${word}" == "--silent" || "${word}" == "-s" ]]; then
|
if [[ "${word}" == "--silent" || "${word}" == "-s" ]]; then
|
||||||
silent=true
|
silent=true
|
||||||
|
|
@ -334,15 +334,7 @@ function _bash-it-update-() {
|
||||||
log_color="%Cred"
|
log_color="%Cred"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for i in $(git rev-list --merges --first-parent "${revision}"); do
|
git log --format="${log_color}%h: %s (%an)" "${revision}"
|
||||||
num_of_lines=$(git log -1 --format=%B "$i" | awk '!/^[[:space:]]*$/ {++i} END{print i}')
|
|
||||||
if [[ "$num_of_lines" -eq 1 ]]; then
|
|
||||||
description="%s"
|
|
||||||
else
|
|
||||||
description="%b"
|
|
||||||
fi
|
|
||||||
git log --format="${log_color}%h: $description (%an)" -1 "$i"
|
|
||||||
done
|
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
if [[ -n "${silent}" ]]; then
|
if [[ -n "${silent}" ]]; then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue