Commit Diff


commit - a004b24a97cfaa2be171871f42cdc15e24fa8682
commit + cacf16907d60b1450a87868913052cb6dd375b24
blob - bfc4692ed93bfd9f74dea2238d3700924e4d9a4f
blob + 32d532502b365f2075bf7052eb2122effff930d6
--- tog/tog.c
+++ tog/tog.c
@@ -8483,6 +8483,9 @@ main(int argc, char *argv[])
 	};
 	char *diff_algo_str = NULL;
 
+	if (!isatty(STDIN_FILENO))
+		errx(1, "standard input is not a tty");
+
 	setlocale(LC_CTYPE, "");
 
 	while ((ch = getopt_long(argc, argv, "+hV", longopts, NULL)) != -1) {