{"thread":{"id":"39062","subject":"[PATCH v3 4/5] t4202-log: add tests for --merges=","startedAt":"2015-04-13T15:29:24Z","lastAt":"2015-04-21T17:42:14Z","messageCount":12,"participants":["Koosha Khajehmoogahi","Eric Sunshine","Junio C Hamano","SZEDER Gábor"],"isPatch":true,"patchVersion":3,"patchTotal":5},"messages":[{"id":"259301","messageId":"1428938968-19013-1-git-send-email-koosha@posteo.de","threadId":"39062","inReplyTo":null,"subject":"[PATCH v3 1/5] revision: add --merges={show|only|hide} option","fromName":"Koosha Khajehmoogahi","fromEmail":"koosha@posteo.de","sentAt":"2015-04-13T15:29:24Z","receivedAt":"2015-04-13T15:29:24Z","isPatch":true,"sender":{"key":"koosha@posteo.de","avatar":null},"body":"From: Junio C Hamano <gitster@pobox.com>\n\nAdd a new option 'merges=' with possible values of 'only', 'show' and\n'hide'. The option is used when showing the list of commits. The value\n'only' lists only merges. The value 'show' is the default behavior\nwhich shows the commits as well as merges and the value 'hide' makes it\njust list commit items.\n\n[kk: chose names for options; wrote commit message]\n\nHelped-by: Eric Sunshine <sunshine@sunshineco.com>\nSigned-off-by: Koosha Khajehmoogahi <koosha@posteo.de>\n---\n revision.c | 20 ++++++++++++++++++++\n revision.h |  1 +\n 2 files changed, 21 insertions(+)\n\ndiff --git a/revision.c b/revision.c\nindex 6399a04..c3c3dcc 100644\n--- a/revision.c\n+++ b/revision.c\n@@ -1678,6 +1678,23 @@ static void add_message_grep(struct rev_info *revs, const char *pattern)\n \tadd_grep(revs, pattern, GREP_PATTERN_BODY);\n }\n \n+int parse_merges_opt(struct rev_info *revs, const char *param)\n+{\n+\tif (!strcmp(param, \"show\")) {\n+\t\trevs->min_parents = 0;\n+\t\trevs->max_parents = -1;\n+\t} else if (!strcmp(param, \"only\")) {\n+\t\trevs->min_parents = 2;\n+\t\trevs->max_parents = -1;\n+\t} else if (!strcmp(param, \"hide\")) {\n+\t\trevs->min_parents = 0;\n+\t\trevs->max_parents = 1;\n+\t} else {\n+\t\treturn -1;\n+\t}\n+\treturn 0;\n+}\n+\n static int handle_revision_opt(struct rev_info *revs, int argc, const char **argv,\n \t\t\t       int *unkc, const char **unkv)\n {\n@@ -1800,6 +1817,9 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg\n \t\trevs->show_all = 1;\n \t} else if (!strcmp(arg, \"--remove-empty\")) {\n \t\trevs->remove_empty_trees = 1;\n+\t} else if (starts_with(arg, \"--merges=\")) {\n+\t\tif (parse_merges_opt(revs, arg + 9))\n+\t\t\tdie(\"unknown option: %s\", arg);\n \t} else if (!strcmp(arg, \"--merges\")) {\n \t\trevs->min_parents = 2;\n \t} else if (!strcmp(arg, \"--no-merges\")) {\ndiff --git a/revision.h b/revision.h\nindex 0ea8b4e..f9df58c 100644\n--- a/revision.h\n+++ b/revision.h\n@@ -240,6 +240,7 @@ extern int setup_revisions(int argc, const char **argv, struct rev_info *revs,\n extern void parse_revision_opt(struct rev_info *revs, struct parse_opt_ctx_t *ctx,\n \t\t\t       const struct option *options,\n \t\t\t       const char * const usagestr[]);\n+extern int parse_merges_opt(struct rev_info *, const char *);\n #define REVARG_CANNOT_BE_FILENAME 01\n #define REVARG_COMMITTISH 02\n extern int handle_revision_arg(const char *arg, struct rev_info *revs,\n-- \n2.3.3.263.g095251d.dirty\n"},{"id":"259299","messageId":"1428938968-19013-2-git-send-email-koosha@posteo.de","threadId":"39062","inReplyTo":"1428938968-19013-1-git-send-email-koosha@posteo.de","subject":"[PATCH v3 2/5] log: honor log.merges= option","fromName":"Koosha Khajehmoogahi","fromEmail":"koosha@posteo.de","sentAt":"2015-04-13T15:29:25Z","receivedAt":"2015-04-13T15:29:25Z","isPatch":true,"sender":{"key":"koosha@posteo.de","avatar":null},"body":"From: Junio C Hamano <gitster@pobox.com>\n\nThe config. variable is honored only by log. Other log family commands\nincluding show, shortlog and rev-list are affected only from the\nequivalent command line option (i.e. --merges=). Since these commands\nare somehow different representations of log command, we like to have\nthe same behavior from them as we do from log itself. However, to not\nbreak the default output of them, we do not consider the the config.\nvar. Other log-family commands format-patch and cherry ignore the option\naltogether (i.e. both on command line and on config settings).\n\n[kk: wrote commit message]\n\nHelped-by: Eric Sunshine <sunshine@sunshineco.com>\nSigned-off-by: Koosha Khajehmoogahi <koosha@posteo.de>\n---\n builtin/log.c | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/builtin/log.c b/builtin/log.c\nindex dd8f3fc..c7a7aad 100644\n--- a/builtin/log.c\n+++ b/builtin/log.c\n@@ -36,6 +36,7 @@ static int decoration_given;\n static int use_mailmap_config;\n static const char *fmt_patch_subject_prefix = \"PATCH\";\n static const char *fmt_pretty;\n+static const char *log_merges;\n \n static const char * const builtin_log_usage[] = {\n \tN_(\"git log [<options>] [<revision range>] [[--] <path>...]\"),\n@@ -386,6 +387,9 @@ static int git_log_config(const char *var, const char *value, void *cb)\n \t\t\tdecoration_style = 0; /* maybe warn? */\n \t\treturn 0;\n \t}\n+\tif (!strcmp(var, \"log.merges\")) {\n+\t\treturn git_config_string(&log_merges, var, value);\n+\t}\n \tif (!strcmp(var, \"log.showroot\")) {\n \t\tdefault_show_root = git_config_bool(var, value);\n \t\treturn 0;\n@@ -628,6 +632,8 @@ int cmd_log(int argc, const char **argv, const char *prefix)\n \n \tinit_revisions(&rev, prefix);\n \trev.always_show_header = 1;\n+\tif (log_merges && parse_merges_opt(&rev, log_merges))\n+\t\tdie(\"unknown config value for log.merges: %s\", log_merges);\n \tmemset(&opt, 0, sizeof(opt));\n \topt.def = \"HEAD\";\n \topt.revarg_opt = REVARG_COMMITTISH;\n-- \n2.3.3.263.g095251d.dirty\n"},{"id":"259298","messageId":"1428938968-19013-3-git-send-email-koosha@posteo.de","threadId":"39062","inReplyTo":"1428938968-19013-1-git-send-email-koosha@posteo.de","subject":"[PATCH v3 3/5] Documentation: add git-log --merges= option and log.merges config. var","fromName":"Koosha Khajehmoogahi","fromEmail":"koosha@posteo.de","sentAt":"2015-04-13T15:29:26Z","receivedAt":"2015-04-13T15:29:26Z","isPatch":true,"sender":{"key":"koosha@posteo.de","avatar":null},"body":"From: Junio C Hamano <gitster@pobox.com>\n\n[kk: added documentation in git-log.txt]\n\nSigned-off-by: Koosha Khajehmoogahi <koosha@posteo.de>\n---\n Documentation/git-log.txt          |  3 +++\n Documentation/rev-list-options.txt | 17 +++++++++++++++++\n 2 files changed, 20 insertions(+)\n\ndiff --git a/Documentation/git-log.txt b/Documentation/git-log.txt\nindex 18bc716..e16f0f8 100644\n--- a/Documentation/git-log.txt\n+++ b/Documentation/git-log.txt\n@@ -190,6 +190,9 @@ log.showRoot::\n \t`git log -p` output would be shown without a diff attached.\n \tThe default is `true`.\n \n+log.merges::\n+    Default for `--merges=` option. Defaults to `show`.\n+\n mailmap.*::\n \tSee linkgit:git-shortlog[1].\n \ndiff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt\nindex f620ee4..88f152f 100644\n--- a/Documentation/rev-list-options.txt\n+++ b/Documentation/rev-list-options.txt\n@@ -96,6 +96,23 @@ if it is part of the log message.\n --remove-empty::\n \tStop when a given path disappears from the tree.\n \n+--merges={show|hide|only}::\n+\n+\tLimit the output by type of commits.\n+\n+\t`hide`;;\n+\t\tHide merge commits from the output.\n+\n+\t`only`;;\n+\t\tHide non-merge commits from the output (i.e showing\n+\t\tonly merge commits).\n+\n+\t`show`;;\n+\t\tDo not hide either merge or non-merge commits. This\n+\t\tis primarily useful when the user has non-standard\n+\t\tsetting of `log.merges` configuration variable that\n+\t\tneeds to be overriden from the command line.\n+\n --merges::\n \tPrint only merge commits. This is exactly the same as `--min-parents=2`.\n \n-- \n2.3.3.263.g095251d.dirty\n"},{"id":"259297","messageId":"1428938968-19013-4-git-send-email-koosha@posteo.de","threadId":"39062","inReplyTo":"1428938968-19013-1-git-send-email-koosha@posteo.de","subject":"[PATCH v3 4/5] t4202-log: add tests for --merges=","fromName":"Koosha Khajehmoogahi","fromEmail":"koosha@posteo.de","sentAt":"2015-04-13T15:29:27Z","receivedAt":"2015-04-13T15:29:27Z","isPatch":true,"sender":{"key":"koosha@posteo.de","avatar":null},"body":"From: Eric Sunshine <sunshine@sunshineco.com>\nSigned-off-by: Koosha Khajehmoogahi <koosha@posteo.de>\n---\n t/t4202-log.sh | 29 +++++++++++++++++++++++++++++\n 1 file changed, 29 insertions(+)\n\ndiff --git a/t/t4202-log.sh b/t/t4202-log.sh\nindex 1b2e981..3edcd81 100755\n--- a/t/t4202-log.sh\n+++ b/t/t4202-log.sh\n@@ -270,6 +270,35 @@ cat > expect <<\\EOF\n * initial\n EOF\n \n+test_expect_success 'setup merges=' '\n+\tgit log --min-parents=2 --pretty=tformat:%s >expect_only &&\n+\tgit log --max-parents=1 --pretty=tformat:%s >expect_hide &&\n+\tgit log --min-parents=-1 --pretty=tformat:%s >expect_show\n+'\n+\n+test_log_merges() {\n+\texpect=expect_$1\n+\tconfig=${2:+-c log.merges=$2}\n+\toption=${3:+--merges=$3}\n+\toption=${4:-$option}\n+\ttest_expect_success \"merges${config:+ $config}${option:+ $option}\" \"\n+\t\tgit $config log $option --pretty=tformat:%s >actual &&\n+\t\ttest_cmp $expect actual\n+\t\"\n+}\n+\n+states=\"show only hide\"\n+for c in '' $states\n+do\n+\tfor o in '' $states\n+\tdo\n+\t\ttest_log_merges ${o:-${c:-show}} \"$c\" \"$o\"\n+\tdone\n+done\n+\n+test_log_merges hide show '' --no-merges\n+test_log_merges only hide '' '--merges --max-parents=2'\n+\n test_expect_success 'log --graph with merge' '\n \tgit log --graph --date-order --pretty=tformat:%s |\n \t\tsed \"s/ *\\$//\" >actual &&\n-- \n2.3.3.263.g095251d.dirty\n"},{"id":"259300","messageId":"1428938968-19013-5-git-send-email-koosha@posteo.de","threadId":"39062","inReplyTo":"1428938968-19013-1-git-send-email-koosha@posteo.de","subject":"[PATCH v3 5/5] bash-completion: add support for git-log --merges= and log.merges","fromName":"Koosha Khajehmoogahi","fromEmail":"koosha@posteo.de","sentAt":"2015-04-13T15:29:28Z","receivedAt":"2015-04-13T15:29:28Z","isPatch":true,"sender":{"key":"koosha@posteo.de","avatar":null},"body":"Helped-by: Eric Sunshine <sunshine@sunshineco.com>\nSigned-off-by: Koosha Khajehmoogahi <koosha@posteo.de>\n---\n contrib/completion/git-completion.bash | 13 +++++++++++--\n 1 file changed, 11 insertions(+), 2 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex fbe5972..a75d7f5 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -1406,7 +1406,7 @@ _git_ls_tree ()\n __git_log_common_options=\"\n \t--not --all\n \t--branches --tags --remotes\n-\t--first-parent --merges --no-merges\n+\t--first-parent --merges --merges= --no-merges\n \t--max-count=\n \t--max-age= --since= --after=\n \t--min-age= --until= --before=\n@@ -1451,7 +1451,11 @@ _git_log ()\n \t\t__gitcomp \"long short\" \"\" \"${cur##--decorate=}\"\n \t\treturn\n \t\t;;\n-\t--*)\n+\t--merges=*)\n+\t\t__gitcomp \"show hide only\" \"\" \"${cur##--merges=}\"\n+\t\treturn\n+\t\t;;\n+\t\t--*)\n \t\t__gitcomp \"\n \t\t\t$__git_log_common_options\n \t\t\t$__git_log_shortlog_options\n@@ -1861,6 +1865,10 @@ _git_config ()\n \t\t__gitcomp \"$__git_log_date_formats\"\n \t\treturn\n \t\t;;\n+\tlog.merges)\n+\t\t__gitcomp \"show hide only\"\n+\t\treturn\n+\t\t;;\n \tsendemail.aliasesfiletype)\n \t\t__gitcomp \"mutt mailrc pine elm gnus\"\n \t\treturn\n@@ -2150,6 +2158,7 @@ _git_config ()\n \t\tinteractive.singlekey\n \t\tlog.date\n \t\tlog.decorate\n+\t\tlog.merges\n \t\tlog.showroot\n \t\tmailmap.file\n \t\tman.\n-- \n2.3.3.263.g095251d.dirty\n"},{"id":"259327","messageId":"CAPig+cQG4NxxmtaQ49xsU3g6UwZb0RqE67PnQBeYrRv=2CGodw@mail.gmail.com","threadId":"39062","inReplyTo":"1428938968-19013-3-git-send-email-koosha@posteo.de","subject":"Re: [PATCH v3 3/5] Documentation: add git-log --merges= option and log.merges config. var","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2015-04-14T06:42:31Z","receivedAt":"2015-04-14T06:42:31Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Mon, Apr 13, 2015 at 11:29 AM, Koosha Khajehmoogahi <koosha@posteo.de> wrote:\n> From: Junio C Hamano <gitster@pobox.com>\n>\n> [kk: added documentation in git-log.txt]\n>\n> Signed-off-by: Koosha Khajehmoogahi <koosha@posteo.de>\n> ---\n> diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt\n> index f620ee4..88f152f 100644\n> --- a/Documentation/rev-list-options.txt\n> +++ b/Documentation/rev-list-options.txt\n> @@ -96,6 +96,23 @@ if it is part of the log message.\n>  --remove-empty::\n>         Stop when a given path disappears from the tree.\n>\n> +--merges={show|hide|only}::\n> +\n> +       Limit the output by type of commits.\n> +\n> +       `hide`;;\n> +               Hide merge commits from the output.\n> +\n> +       `only`;;\n> +               Hide non-merge commits from the output (i.e showing\n> +               only merge commits).\n> +\n> +       `show`;;\n> +               Do not hide either merge or non-merge commits. This\n> +               is primarily useful when the user has non-standard\n> +               setting of `log.merges` configuration variable that\n> +               needs to be overriden from the command line.\n\ns/overriden/overridden/\n\n>  --merges::\n>         Print only merge commits. This is exactly the same as `--min-parents=2`.\n>\n> --\n> 2.3.3.263.g095251d.dirty\n"},{"id":"259328","messageId":"CAPig+cSfC0sUdsbYHBHk-GcT3zYDptq+7CpteCPQpz6JfHCRkw@mail.gmail.com","threadId":"39062","inReplyTo":"1428938968-19013-4-git-send-email-koosha@posteo.de","subject":"Re: [PATCH v3 4/5] t4202-log: add tests for --merges=","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2015-04-14T06:52:49Z","receivedAt":"2015-04-14T06:52:49Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Mon, Apr 13, 2015 at 11:29 AM, Koosha Khajehmoogahi <koosha@posteo.de> wrote:\n> From: Eric Sunshine <sunshine@sunshineco.com>\n> Signed-off-by: Koosha Khajehmoogahi <koosha@posteo.de>\n\nSigned-off-by: Eric Sunshine <sunshine@sunshineco.com>\n\n> ---\n> diff --git a/t/t4202-log.sh b/t/t4202-log.sh\n> index 1b2e981..3edcd81 100755\n> --- a/t/t4202-log.sh\n> +++ b/t/t4202-log.sh\n> @@ -270,6 +270,35 @@ cat > expect <<\\EOF\n>  * initial\n>  EOF\n>\n> +test_expect_success 'setup merges=' '\n\nThis differs slightly from the version I posted[1], in which I had\nintentionally dropped the '=' from \"merges=\" in the description to\nnormalize the output. (I think it looks slightly nicer without the\n'='.)\n\n[1]: http://article.gmane.org/gmane.comp.version-control.git/266902/\n\n> +       git log --min-parents=2 --pretty=tformat:%s >expect_only &&\n> +       git log --max-parents=1 --pretty=tformat:%s >expect_hide &&\n> +       git log --min-parents=-1 --pretty=tformat:%s >expect_show\n> +'\n> +\n> +test_log_merges() {\n> +       expect=expect_$1\n> +       config=${2:+-c log.merges=$2}\n> +       option=${3:+--merges=$3}\n> +       option=${4:-$option}\n> +       test_expect_success \"merges${config:+ $config}${option:+ $option}\" \"\n> +               git $config log $option --pretty=tformat:%s >actual &&\n> +               test_cmp $expect actual\n> +       \"\n> +}\n> +\n> +states=\"show only hide\"\n> +for c in '' $states\n> +do\n> +       for o in '' $states\n> +       do\n> +               test_log_merges ${o:-${c:-show}} \"$c\" \"$o\"\n> +       done\n> +done\n> +\n> +test_log_merges hide show '' --no-merges\n> +test_log_merges only hide '' '--merges --max-parents=2'\n> +\n>  test_expect_success 'log --graph with merge' '\n>         git log --graph --date-order --pretty=tformat:%s |\n>                 sed \"s/ *\\$//\" >actual &&\n> --\n> 2.3.3.263.g095251d.dirty\n"},{"id":"259451","messageId":"552EE5D7.9070703@posteo.de","threadId":"39062","inReplyTo":"CAPig+cQG4NxxmtaQ49xsU3g6UwZb0RqE67PnQBeYrRv=2CGodw@mail.gmail.com","subject":"Re: [PATCH v3 3/5] Documentation: add git-log --merges= option and log.merges config. var","fromName":"Koosha Khajehmoogahi","fromEmail":"koosha@posteo.de","sentAt":"2015-04-15T22:27:35Z","receivedAt":"2015-04-15T22:27:35Z","isPatch":true,"sender":{"key":"koosha@posteo.de","avatar":null},"body":"\n\nOn 04/14/2015 08:42 AM, Eric Sunshine wrote:\n> On Mon, Apr 13, 2015 at 11:29 AM, Koosha Khajehmoogahi <koosha@posteo.de> wrote:\n>> From: Junio C Hamano <gitster@pobox.com>\n>>\n>> [kk: added documentation in git-log.txt]\n>>\n>> Signed-off-by: Koosha Khajehmoogahi <koosha@posteo.de>\n>> ---\n>> diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt\n>> index f620ee4..88f152f 100644\n>> --- a/Documentation/rev-list-options.txt\n>> +++ b/Documentation/rev-list-options.txt\n>> @@ -96,6 +96,23 @@ if it is part of the log message.\n>>  --remove-empty::\n>>         Stop when a given path disappears from the tree.\n>>\n>> +--merges={show|hide|only}::\n>> +\n>> +       Limit the output by type of commits.\n>> +\n>> +       `hide`;;\n>> +               Hide merge commits from the output.\n>> +\n>> +       `only`;;\n>> +               Hide non-merge commits from the output (i.e showing\n>> +               only merge commits).\n>> +\n>> +       `show`;;\n>> +               Do not hide either merge or non-merge commits. This\n>> +               is primarily useful when the user has non-standard\n>> +               setting of `log.merges` configuration variable that\n>> +               needs to be overriden from the command line.\n> \n> s/overriden/overridden/\n> \n>>  --merges::\n>>         Print only merge commits. This is exactly the same as `--min-parents=2`.\n>>\n>> --\n>> 2.3.3.263.g095251d.dirty\n\nShould I send a new reroll or wait for reviews on my other commits.\nI have not received any review on other patches of this series yet.\n\n-- \nKoosha\n"},{"id":"259455","messageId":"CAPig+cS7aCN5Boevnp_S+rgJP4GKxpMeVSnjEaWEKcNECC-21A@mail.gmail.com","threadId":"39062","inReplyTo":"552EE5D7.9070703@posteo.de","subject":"Re: [PATCH v3 3/5] Documentation: add git-log --merges= option and log.merges config. var","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2015-04-16T04:49:15Z","receivedAt":"2015-04-16T04:49:15Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Wed, Apr 15, 2015 at 6:27 PM, Koosha Khajehmoogahi <koosha@posteo.de> wrote:\n> On 04/14/2015 08:42 AM, Eric Sunshine wrote:\n>> On Mon, Apr 13, 2015 at 11:29 AM, Koosha Khajehmoogahi <koosha@posteo.de> wrote:\n>>> From: Junio C Hamano <gitster@pobox.com>\n>>>\n>>> [kk: added documentation in git-log.txt]\n>>>\n>>> Signed-off-by: Koosha Khajehmoogahi <koosha@posteo.de>\n>>> ---\n>>> @@ -96,6 +96,23 @@ if it is part of the log message.\n>>>  --remove-empty::\n>>>         Stop when a given path disappears from the tree.\n>>>\n>>> +--merges={show|hide|only}::\n>>> +\n>>> +       Limit the output by type of commits.\n>>> +\n>>> +       `hide`;;\n>>> +               Hide merge commits from the output.\n>>> +\n>>> +       `only`;;\n>>> +               Hide non-merge commits from the output (i.e showing\n>>> +               only merge commits).\n>>> +\n>>> +       `show`;;\n>>> +               Do not hide either merge or non-merge commits. This\n>>> +               is primarily useful when the user has non-standard\n>>> +               setting of `log.merges` configuration variable that\n>>> +               needs to be overriden from the command line.\n>>\n>> s/overriden/overridden/\n>\n> Should I send a new reroll or wait for reviews on my other commits.\n> I have not received any review on other patches of this series yet.\n\nLack of review comments does not necessarily mean that people did not\nreview the patches; it could mean that reviewers had nothing more to\nsay. In addition to pointing out the typo above, I also made a small\ncomment[1] on patch 4/5, but otherwise did not find anything else\nabout which to comment.\n\nWhether or not you should re-send is something Junio can answer. He\nwill sometimes silently pick up a series as-is or sometimes silently\nmake minor fixes based upon review comments. Check his 'pu' branch\nperiodically to see if your series appears there and if it has those\nminor adjustments. If not, and if he doesn't answer this question,\nthen you may need to re-roll.\n\n[1]: http://article.gmane.org/gmane.comp.version-control.git/267118\n"},{"id":"259457","messageId":"CAPc5daU+fk+d_tUiCmy0uwx7N5PYwLhqg6CmYGyaik_2VzQnMg@mail.gmail.com","threadId":"39062","inReplyTo":"1428938968-19013-2-git-send-email-koosha@posteo.de","subject":"Re: [PATCH v3 2/5] log: honor log.merges= option","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-04-16T06:07:35Z","receivedAt":"2015-04-16T06:07:35Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"On Mon, Apr 13, 2015 at 8:29 AM, Koosha Khajehmoogahi <koosha@posteo.de> wrote:\n> From: Junio C Hamano <gitster@pobox.com>\n\nLet's not call this *my* change. The mechanism I did write, but I think the\nmost important part of the change is to decide which commands in the\nlog family should honor the configuration variable and which ones should\nnot. As I said in the beginning, I am not convinced that letting \"git log\" and\n\"git log\" alone is the right choice. Make it \"Helped-by\" or something instead,\nto make it clear that I helped the implementation but not the design.\n\n> The config. variable is honored only by log. Other log family commands\n> including show, shortlog and rev-list are affected only from the\n> equivalent command line option (i.e. --merges=). Since these commands\n> are somehow different representations of log command, we like to have\n> the same behavior from them as we do from log itself. However, to not\n> break the default output of them, we do not consider the the config.\n\nThat is a weak argument, isn't it? If we really wanted not to break the\ndefault output, then \"git log\" should not honor the configuration variable,\neither. And I do not agree with \"we like to have the same behaviour\" in\nthe first place.\n\nMy preference, as I already hinted in previous review rounds, is:\n\n - \"log\" and \"whatchanged\" are the same things and should behave the\n   same way with respect to this configuration variable;\n\n - \"rev-list\" is plumbing and should never pay attention to a UI level\n   configuration variable like this one;\n\n - \"show\" is given exact commit object(s) and is asked to show them;\n   not showing what was explicitly asked to be shown only because\n   the user has \"do not show merges\" configuration does not make\n   much sense, so the configuration variable should be ignored;\n\n - The revision graph traversal done by \"format-patch\" and \"cherry-pick\"\n   is primarily to determine the set of commits to process and of a\n   different nature from the traversal done by \"log\", even though they\n   share the same underlying code. It is not appropriate to pay attention\n   to this configuration variable.\n\n - I am neutral as to \"shortlog\". As long as it pays attention to the\n   new command line override, I think it is OK if it paid attention to\n   the configuration variable, primarily because people most of the\n   time use \"shortlog --no-merges\" with the current version of Git\n   _anyway_.\n\nThanks.\n"},{"id":"259733","messageId":"1429620684-7760-1-git-send-email-szeder@ira.uka.de","threadId":"39062","inReplyTo":"1428938968-19013-5-git-send-email-koosha@posteo.de","subject":"[PATCH] squash! bash-completion: add support for git-log --merges= and log.merges","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2015-04-21T12:51:24Z","receivedAt":"2015-04-21T12:51:24Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"---\nThe patch at the tip of kk/log-merges-config misindented one of the case\narms, this one amends it.\n\n contrib/completion/git-completion.bash | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex a75d7f5..83b2359 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -1454,9 +1454,9 @@ _git_log ()\n \t--merges=*)\n \t\t__gitcomp \"show hide only\" \"\" \"${cur##--merges=}\"\n \t\treturn\n \t\t;;\n-\t\t--*)\n+\t--*)\n \t\t__gitcomp \"\n \t\t\t$__git_log_common_options\n \t\t\t$__git_log_shortlog_options\n \t\t\t$__git_log_gitk_options\n-- \n1.9.5.msysgit.0\n"},{"id":"259748","messageId":"xmqqwq15gyyx.fsf@gitster.dls.corp.google.com","threadId":"39062","inReplyTo":"1429620684-7760-1-git-send-email-szeder@ira.uka.de","subject":"Re: [PATCH] squash! bash-completion: add support for git-log --merges= and log.merges","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-04-21T17:42:14Z","receivedAt":"2015-04-21T17:42:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks.\n"}]}