Commit Diff


commit - 7e0ec0529553d4a8e236cad41366f79eda5126b3
commit + 3264c09cde46f38f7530f9e07225846c916c020e
blob - 9d57af707725df8ed20c18c242b8359ad3a3270c
blob + 7c4a3a3ec931571a98d0d6e4cf5ece1a0c3a0fc5
--- tog/tog.c
+++ tog/tog.c
@@ -8478,6 +8478,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) {