Browse Source

Playing around with --view output a bit for readability

spesk1 4 years ago
parent
commit
7a6fb7d58a
1 changed files with 5 additions and 3 deletions
  1. 5 3
      sg

+ 5 - 3
sg

@@ -303,15 +303,17 @@ if ( defined $args{'knock'} && scalar keys %args == 2 ) {
 # TODO: This sub could be more concise with a sub to print array refs
 if ( defined $args{'view'} ) {
 	my ( $untrackedRef, $modifiedRef, $addedRef, $deletedRef ) = returnState($logger);
-	my $refs = shellex("$gitCmd show-ref",$logger);
+	#my $refs = shellex("$gitCmd show-ref",$logger);
 	my $branch = shellex("$gitCmd show-branch",$logger);
 	my $name = shellex("$gitCmd config --get user.name",$logger);
 	chomp $name;
 	my $email = shellex("$gitCmd config --get user.email",$logger);
 	chomp $email;
 	color_print("-->Username: $name\n-->Email: $email\n","BLUE");
-	color_print("On [branch] @ commit: $branch\n","GREEN");
-	print "$refs\n";
+	print "Branches:\n";
+	color_print("$branch\n","GREEN");
+	#print "$refs\n";
+	print "Files:\n";
 	my $swpWarning = "\t# Likely a Vi .swp file";
 
 	my $untrackedTotal = scalar @$untrackedRef;