{"thread":{"id":"38807","subject":"[PATCH] forbid log --graph --no-walk","startedAt":"2015-03-14T21:35:55Z","lastAt":"2015-03-14T21:35:55Z","messageCount":1,"participants":["epilys"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"257687","messageId":"5504A9BB.2040103@norn.io","threadId":"38807","inReplyTo":null,"subject":"[PATCH] forbid log --graph --no-walk","fromName":"epilys","fromEmail":"epilys@norn.io","sentAt":"2015-03-14T21:35:55Z","receivedAt":"2015-03-14T21:35:55Z","isPatch":true,"sender":{"key":"epilys@norn.io","avatar":"https://gravatar.com/avatar/f68083a5405ad14d6e324de2eb2dc2beab603134c1847f421fb0c0095f3b4625?d=mp&s=160"},"body":"In git-log, --graph shows a graphical representation of a\ncontinuous commit history, and --no-walk shows discrete specified\ncommits without continuity. This doesn't make sense, so we forbid the\ncombined use of these flags.\n\nSigned-off-by: Manos Pitsidianakis <epilys@norn.io>\n---\n builtin/log.c  | 2 ++\n t/t4202-log.sh | 4 ++++\n 2 files changed, 6 insertions(+)\n\ndiff --git a/builtin/log.c b/builtin/log.c\nindex dd8f3fc..0194133 100644\n--- a/builtin/log.c\n+++ b/builtin/log.c\n@@ -155,6 +155,8 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,\n \tmemset(&w, 0, sizeof(w));\n \tuserformat_find_requirements(NULL, &w);\n \n+    if (rev->graph && rev->no_walk)\n+        die(\"--graph and --no-walk are incompatible\");\n \tif (!rev->show_notes_given && (!rev->pretty_given || w.notes))\n \t\trev->show_notes = 1;\n \tif (rev->show_notes)\ndiff --git a/t/t4202-log.sh b/t/t4202-log.sh\nindex 5f2b290..4dd939b 100755\n--- a/t/t4202-log.sh\n+++ b/t/t4202-log.sh\n@@ -887,4 +887,8 @@ test_expect_success GPG 'log --graph --show-signature for merged tag' '\n \tgrep \"^| | gpg: Good signature\" actual\n '\n \n+test_expect_success 'forbid log --graph --no-walk' '\n+    test_must_fail git log --graph --no-walk\n+'\n+\n test_done\n-- \n2.1.4\n"}]}