{"thread":{"id":"38808","subject":"[GSoC][PATCH v2] log: forbid log --graph --no-walk","startedAt":"2015-03-14T23:33:07Z","lastAt":"2015-03-15T00:04:41Z","messageCount":4,"participants":["epilys","brian m. carlson"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"257693","messageId":"5504C533.7060304@norn.io","threadId":"38808","inReplyTo":"md5:Tyvg1g0l6oUcTR3FnSDstw==","subject":"[GSoC][PATCH v2] log: forbid log --graph --no-walk","fromName":"epilys","fromEmail":"epilys@norn.io","sentAt":"2015-03-14T23:33:07Z","receivedAt":"2015-03-14T23:33:07Z","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 continuous\ncommit history, and --no-walk shows discrete specified commits without\ncontinuity. Using both doesn't make sense, so we forbid the combined use\nof 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"},{"id":"257694","messageId":"20150314234718.GA612775@vauxhall.crustytoothpaste.net","threadId":"38808","inReplyTo":"5504C533.7060304@norn.io","subject":"Re: [GSoC][PATCH v2] log: forbid log --graph --no-walk","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2015-03-14T23:47:19Z","receivedAt":"2015-03-14T23:47:19Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On Sun, Mar 15, 2015 at 01:33:07AM +0200, epilys wrote:\n> diff --git a/builtin/log.c b/builtin/log.c\n> index 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\nIt looks like you indented here with four spaces instead of a tab.  We\nprefer tabs in Git.\n\n>  \tif (!rev->show_notes_given && (!rev->pretty_given || w.notes))\n>  \t\trev->show_notes = 1;\n>  \tif (rev->show_notes)\n> diff --git a/t/t4202-log.sh b/t/t4202-log.sh\n> index 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\nAnd here as well.\n-- \nbrian m. carlson / brian with sandals: Houston, Texas, US\n+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only\nOpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187\n"},{"id":"257695","messageId":"5504CA70.2030602@norn.io","threadId":"38808","inReplyTo":"20150314234718.GA612775@vauxhall.crustytoothpaste.net","subject":"Re: [GSoC][PATCH v2] log: forbid log --graph --no-walk","fromName":"epilys","fromEmail":"epilys@norn.io","sentAt":"2015-03-14T23:55:28Z","receivedAt":"2015-03-14T23:55:28Z","isPatch":true,"sender":{"key":"epilys@norn.io","avatar":"https://gravatar.com/avatar/f68083a5405ad14d6e324de2eb2dc2beab603134c1847f421fb0c0095f3b4625?d=mp&s=160"},"body":"On 03/15/2015 01:47 AM, brian m. carlson wrote:\n> It looks like you indented here with four spaces instead of a tab. \n> We prefer tabs in Git.\n\nMessed that up. Do you think I should resubmit a v3 or am I hogging\nthe mailing list too much?\n"},{"id":"257696","messageId":"20150315000440.GB612775@vauxhall.crustytoothpaste.net","threadId":"38808","inReplyTo":"5504CA70.2030602@norn.io","subject":"Re: [GSoC][PATCH v2] log: forbid log --graph --no-walk","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2015-03-15T00:04:41Z","receivedAt":"2015-03-15T00:04:41Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On Sun, Mar 15, 2015 at 01:55:28AM +0200, epilys wrote:\n> On 03/15/2015 01:47 AM, brian m. carlson wrote:\n> > It looks like you indented here with four spaces instead of a tab. \n> > We prefer tabs in Git.\n> \n> Messed that up. Do you think I should resubmit a v3 or am I hogging\n> the mailing list too much?\n\nYou're going to want to submit a v3.  While you're at it, you probably\nwant to drop the [GSoC] from the patch header, as it will be part of the\ncommit message when applied, and we don't want that.  Finally, you\nprobably want to use your full name in the From: line, as that will be\nused to create the commit, and we prefer full names over aliases as well.\n\nIt can be helpful to try formatting the patch with git format-patch and\nthen checking over it with less and applying it with git am to see how\nit will look to other Git developers.\n\nThis is a small patch, so it's not as big a deal, but for larger series\nI generally try to wait two or three days (at least one of which is a\nweekday) before posting a new version so that people have time to read,\ntest, and comment on it.\n-- \nbrian m. carlson / brian with sandals: Houston, Texas, US\n+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only\nOpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187\n"}]}