chomp the output from git ls-files. Display a helpful message nothing is
authorNicholas Clark <nick@ccl4.org>
Tue, 13 Jan 2009 17:51:20 +0000 (17:51 +0000)
committerNicholas Clark <nick@ccl4.org>
Tue, 13 Jan 2009 17:51:20 +0000 (17:51 +0000)
modified, rather than failing back to the usage message.

Porting/Maintainers.pm

index 40266f5..d3d1dbd 100644 (file)
@@ -108,7 +108,7 @@ sub process_options {
     my @Files;
 
     if ($Opened) {
-       @Files = `git ls-files -m --full-name`;
+       chomp (@Files = `git ls-files -m --full-name`);
        die if $?;
     } else {
        @Files = @ARGV;
@@ -246,6 +246,9 @@ sub show_results {
            }
        }
     }
+    elsif ($Opened) {
+       print "(No files are modified)\n";
+    }
     else {
        usage();
     }