diff --git a/git/git_push_stats.sh b/git/git_push_stats.sh index 38db06db966..7395a289edd 100755 --- a/git/git_push_stats.sh +++ b/git/git_push_stats.sh @@ -41,23 +41,19 @@ help_usage "$@" num_commits="$("$srcdir/git_origin_commits_to_push.sh")" +num_lines_diff="$("$srcdir/git_origin_diff_to_push.sh" | wc -l | sed 's/[[:space:]]*//g')" + # delete the last line of diff only if it's blank, # so that when there is nothing to push we get 0 instead of 1 line as the result -num_diff_lines="$( - "$srcdir/git_origin_diff_to_push.sh" --unified=0 | - sed -n '/^[+-]/ {/^\(---\|+++\)/!p}' | - sed '$ { /^[[:space:]]*$/d }' | - wc -l | - sed 's/[[:space:]]*//g' -)" +num_lines_changed="$("$srcdir/git_origin_lines_changed_to_push.sh")" cat <