Skip to contentSkip to conversation

checkpatch: if no filenames then read stdin

PATCH New [email protected] 1 participant 1 message Aug 2, 2016 Checkpatch

lore
Share & tools
lore
#0 lore raw

PATCH 56/111 checkpatch: if no filenames then read stdin

From: Allen Hubbe <[email protected]>
Subject: checkpatch: if no filenames then read stdin

If no filenames are given, then read the patch from stdin.

---

 scripts/checkpatch.pl |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/checkpatch.pl renamed from scripts/checkpatch.pl~checkpatch-if-no-filenames-then-read-stdin +2 -2
diff -puN scripts/checkpatch.pl~checkpatch-if-no-filenames-then-read-stdin scripts/checkpatch.pl
@@ -228,9 +228,9 @@ if ($^V && $^V lt $minimum_perl_version)
 	}
 }
 
+#if no filenames are given, push '-' to read patch from stdin
 if ($#ARGV < 0) {
-	print "$P: no input files\n";
-	exit(1);
+	push(@ARGV, '-');
 }
 
 sub hash_save_array_words {

_