@@ -345,35 +345,6 @@ function GenerateReport # (local_branch_name remote_branch_name)
345345 if [ ${# remote_msg} -gt $remote_w ] ; then remote_w=${# remote_msg} ; fi ;
346346}
347347
348- function PrintReportLine
349- {
350- # fetch data
351- local_msg=$( echo ${local_msgs[$result_n]} | sed " $JOIN_REGEX " )
352- behind_msg=$( echo ${behind_msgs[$result_n]} | sed " $JOIN_REGEX " )
353- ahead_msg=$( echo ${ahead_msgs[$result_n]} | sed " $JOIN_REGEX " )
354- remote_msg=$( echo ${remote_msgs[$result_n]} | sed " $JOIN_REGEX " )
355- local_color=" ${local_colors[$result_n]} "
356- behind_color=" ${behind_colors[$result_n]} "
357- ahead_color=" ${ahead_colors[$result_n]} "
358- remote_color=" ${remote_colors[$result_n]} "
359-
360- # calculate column offsets
361- local_offset=1
362- behind_offset=$(( $local_w - ${# local_msg} ))
363- ahead_offset=$(( $behind_w - ${# behind_msg} ))
364- remote_offset=$(( $ahead_w - ${# ahead_msg} ))
365- end_offset=$(( $remote_w - ${# remote_msg} ))
366-
367- # build output messages and display
368- if (( $(IsCurrentBranch $local_msg )) ) ; then star=$STAR ; else star=" " ; fi ;
369- local_msg=" %$(( $local_offset )) s$star $( echo -e $DELIM $local_color$local_msg$CEND ) "
370- behind_msg=" %$(( $behind_offset )) s $( echo -e $DELIM $behind_color$behind_msg$CEND ) "
371- ahead_msg=" %$(( $ahead_offset )) s $( echo -e $DELIM $ahead_color$ahead_msg$CEND ) "
372- remote_msg=" %$(( $remote_offset )) s $( echo -e $DELIM $remote_color$remote_msg$CEND ) "
373- end_msg=" %$(( $end_offset )) s $DELIM "
374- printf " $local_msg$behind_msg$ahead_msg$remote_msg$end_msg \n"
375- }
376-
377348function PrintReport # (table_header_line no_results_msg)
378349{
379350 header=$1
@@ -407,6 +378,35 @@ function PrintReport # (table_header_line no_results_msg)
407378 Reset
408379}
409380
381+ function PrintReportLine
382+ {
383+ # fetch data
384+ local_msg=$( echo ${local_msgs[$result_n]} | sed " $JOIN_REGEX " )
385+ behind_msg=$( echo ${behind_msgs[$result_n]} | sed " $JOIN_REGEX " )
386+ ahead_msg=$( echo ${ahead_msgs[$result_n]} | sed " $JOIN_REGEX " )
387+ remote_msg=$( echo ${remote_msgs[$result_n]} | sed " $JOIN_REGEX " )
388+ local_color=" ${local_colors[$result_n]} "
389+ behind_color=" ${behind_colors[$result_n]} "
390+ ahead_color=" ${ahead_colors[$result_n]} "
391+ remote_color=" ${remote_colors[$result_n]} "
392+
393+ # calculate column offsets
394+ local_offset=1
395+ behind_offset=$(( $local_w - ${# local_msg} ))
396+ ahead_offset=$(( $behind_w - ${# behind_msg} ))
397+ remote_offset=$(( $ahead_w - ${# ahead_msg} ))
398+ end_offset=$(( $remote_w - ${# remote_msg} ))
399+
400+ # build output messages and display
401+ if (( $(IsCurrentBranch $local_msg )) ) ; then star=$STAR ; else star=" " ; fi ;
402+ local_msg=" %$(( $local_offset )) s$star $( echo -e $DELIM $local_color$local_msg$CEND ) "
403+ behind_msg=" %$(( $behind_offset )) s $( echo -e $DELIM $behind_color$behind_msg$CEND ) "
404+ ahead_msg=" %$(( $ahead_offset )) s $( echo -e $DELIM $ahead_color$ahead_msg$CEND ) "
405+ remote_msg=" %$(( $remote_offset )) s $( echo -e $DELIM $remote_color$remote_msg$CEND ) "
406+ end_msg=" %$(( $end_offset )) s $DELIM "
407+ printf " $local_msg$behind_msg$ahead_msg$remote_msg$end_msg \n"
408+ }
409+
410410
411411# ## main entry ###
412412
0 commit comments