Skip to contentSkip to conversation

Fix file list wrapping of cg-log

PATCH New Marcel Holtmann 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix file list wrapping of cg-log

Hi Petr,

the attached patch fixes the file list wrapping for the second and following lines by adding two extra spaces. It also corrects the line width counting that is wrong after the first line break.

Regards

Marcel

cg-log (mode:100755) +3 -2
Index: cg-log
===================================================================
@@ -69,6 +69,7 @@
 {
 	tree1="$1"
 	tree2="$2"
+	line=
 	sep="    * $colfiles"
 	# List all files for for the initial commit
 	if [ -z $tree2 ]; then
@@ -84,9 +85,9 @@
 			line="$line$sep$file"
 			echo -n "$file"
 		else
-			line="$file"
+			line="      $file"
 			echo "$coldefault"
-			echo -n "    $colfiles$file"
+			echo -n "      $colfiles$file"
 		fi
 	done
 	echo "$coldefault:"