aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarstrom <john@ankarstrom.se>2021-07-02 15:45:11 +0200
committerJohn Ankarstrom <john@ankarstrom.se>2021-07-02 15:45:11 +0200
commite48fa664f95ca7d34c824870528cfa3fc8687394 (patch)
tree41d1c43038298983b16dbe894dd98b90249a2018
parent5d4777313eed7a4c777fea2bd316ff233fb59af1 (diff)
downloadxutil-e48fa664f95ca7d34c824870528cfa3fc8687394.tar.gz
git-s: Change output format
-rwxr-xr-xgit-s8
1 files changed, 4 insertions, 4 deletions
diff --git a/git-s b/git-s
index cc560d9..faf55ff 100755
--- a/git-s
+++ b/git-s
@@ -6,12 +6,12 @@ git status -s | perl -ne '
push @{$x{$1}}, $2 if /^(.). (.*)/;
push @{$y{$1}}, $2 if /^.(.) (.*)/;
END {
- delete $x{"?"};
- for ([">" => \%x], ["." => \%y]) {
+ delete $x{"?"}; delete $x{" "}; delete $y{" "};
+ for (["index" => \%x], ["tree" => \%y]) {
($n, $h) = @$_;
+ print "$n:" if values %$h;
for (sort keys %$h) {
- next if $_ eq " ";
- print "$n$_";
+ print " $_ ";
print " $_" for @{$h->{$_}};
print "\n";
}