Skip to content

Commit 669a546

Browse files
committed
updated git_push_stats.sh
1 parent acc56a7 commit 669a546

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Diff for: git/git_push_stats.sh

+8-6
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,13 @@ Shows the Git push stats to the remote origin for the current branch - number of
2626
2727
Utilizes adjacent scripts:
2828
29-
git_origin_log_to_head.sh
29+
git_origin_commit_count_to_push.sh
3030
31-
git_origin_diff_to_head.sh
31+
git_origin_line_count_to_push.sh
32+
33+
git_origin_diff_to_push.sh
34+
35+
git_origin_files_to_push.sh
3236
"
3337

3438
# used by usage() in lib/utils.sh
@@ -41,12 +45,10 @@ help_usage "$@"
4145

4246
num_commits="$("$srcdir/git_origin_commit_count_to_push.sh")"
4347

44-
num_lines_diff="$("$srcdir/git_origin_diff_to_push.sh" | wc -l | sed 's/[[:space:]]*//g')"
45-
46-
# delete the last line of diff only if it's blank,
47-
# so that when there is nothing to push we get 0 instead of 1 line as the result
4848
num_lines_changed="$("$srcdir/git_origin_line_count_to_push.sh")"
4949

50+
num_lines_diff="$("$srcdir/git_origin_diff_to_push.sh" | wc -l | sed 's/[[:space:]]*//g')"
51+
5052
files="$("$srcdir/git_origin_files_to_push.sh")"
5153

5254
files_added="$(grep -c '^A' <<< "$files" || :)"

0 commit comments

Comments
 (0)