{"thread":{"id":"8280","subject":"[PATCH] disable merge summaries if they are disabled","startedAt":"2007-05-23T15:28:07Z","lastAt":"2007-05-23T21:01:29Z","messageCount":9,"participants":["Alex Riesen","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"43035","messageId":"81b0412b0705230828s7fcdd836gf3bb92000d8ebd79@mail.gmail.com","threadId":"8280","inReplyTo":null,"subject":"[PATCH] disable merge summaries if they are disabled","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-05-23T15:28:07Z","receivedAt":"2007-05-23T15:28:07Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Otherwise the merge.summary option has no visible effect.\n\n---\n git-merge.sh |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\n\nFrom 20ef81ca3b30a4c96906b3512ca1b52d2bec3698 Mon Sep 17 00:00:00 2001\nFrom: Alex Riesen <raa.lkml@gmail.com>\nDate: Wed, 23 May 2007 15:52:16 +0200\nSubject: [PATCH] disable merge summaries if they are disabled\n\n---\n git-merge.sh |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/git-merge.sh b/git-merge.sh\nindex 351676f..7fbe03a 100755\n--- a/git-merge.sh\n+++ b/git-merge.sh\n@@ -121,6 +121,7 @@ merge_name () {\n case \"$#\" in 0) usage ;; esac\n \n have_message=\n+test $(git-config merge.summary) = false && no_summary=t\n while case \"$#\" in 0) break ;; esac\n do\n \tcase \"$1\" in\n-- \n1.5.2.784.gb18c\n\n"},{"id":"43036","messageId":"81b0412b0705230903j197c2b8ewfbf81002c0e6b5be@mail.gmail.com","threadId":"8280","inReplyTo":"81b0412b0705230828s7fcdd836gf3bb92000d8ebd79@mail.gmail.com","subject":"Re: [PATCH] disable merge summaries if they are disabled","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-05-23T16:03:54Z","receivedAt":"2007-05-23T16:03:54Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Otherwise the merge.summary option has no visible effect.\n\nSigned-off-by: Alex Riesen <raa.lkml@gmail.com>\n\n---\n\nForgot the sign-off.\n\n git-merge.sh |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\n\nFrom 20ef81ca3b30a4c96906b3512ca1b52d2bec3698 Mon Sep 17 00:00:00 2001\nFrom: Alex Riesen <raa.lkml@gmail.com>\nDate: Wed, 23 May 2007 15:52:16 +0200\nSubject: [PATCH] disable merge summaries if they are disabled\n\nSigned-off-by: Alex Riesen <raa.lkml@gmail.com>\n---\n git-merge.sh |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/git-merge.sh b/git-merge.sh\nindex 351676f..7fbe03a 100755\n--- a/git-merge.sh\n+++ b/git-merge.sh\n@@ -121,6 +121,7 @@ merge_name () {\n case \"$#\" in 0) usage ;; esac\n \n have_message=\n+test $(git-config merge.summary) = false && no_summary=t\n while case \"$#\" in 0) break ;; esac\n do\n \tcase \"$1\" in\n-- \n1.5.2.787.g56770\n\n"},{"id":"43042","messageId":"7vhcq32yda.fsf@assigned-by-dhcp.cox.net","threadId":"8280","inReplyTo":"81b0412b0705230828s7fcdd836gf3bb92000d8ebd79@mail.gmail.com","subject":"Re: [PATCH] disable merge summaries if they are disabled","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-05-23T18:22:57Z","receivedAt":"2007-05-23T18:22:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Alex Riesen\" <raa.lkml@gmail.com> writes:\n\n> Otherwise the merge.summary option has no visible effect.\n\nI suspect you are mistaking a different merge summary.  The\noption affects fmt-merge-msg, iow, the shortlog looking summary\nthat appears as the commit message in a merge commit.\n\nThe command line parameter --no-summary inhibits the diffstat\ngiven to the terminal after \"git-pull/git-merge\" is made.\n"},{"id":"43043","messageId":"20070523195823.GA2554@steel.home","threadId":"8280","inReplyTo":"7vhcq32yda.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] disable merge summaries if they are disabled","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-05-23T19:58:23Z","receivedAt":"2007-05-23T19:58:23Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Junio C Hamano, Wed, May 23, 2007 20:22:57 +0200:\n> \"Alex Riesen\" <raa.lkml@gmail.com> writes:\n> \n> > Otherwise the merge.summary option has no visible effect.\n> \n> I suspect you are mistaking a different merge summary.  The\n> option affects fmt-merge-msg, iow, the shortlog looking summary\n> that appears as the commit message in a merge commit.\n> \n> The command line parameter --no-summary inhibits the diffstat\n> given to the terminal after \"git-pull/git-merge\" is made.\n> \n\nI did it again, didn't I?! :)\n"},{"id":"43044","messageId":"20070523200223.GB2554@steel.home","threadId":"8280","inReplyTo":"20070523195823.GA2554@steel.home","subject":"[PATCH] Add a configuration option to control diffstat after merge","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-05-23T20:02:23Z","receivedAt":"2007-05-23T20:02:23Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"The diffstat can be controlled either with command-line options\n(--summary|--no-summary) or with merge.diffstat. The default is\nleft as it was: diffstat is active by default.\n\nSigned-off-by: Alex Riesen <raa.lkml@gmail.com>\n---\n\nI have to explain the implementation a bit: in Windows, every exec is\n*very* expensive, so I tried to avoid a call to git-config as long as\npossible. The stupid OS is my reason for this change, actually:\ndiffstat not just takes too long. It also takes a *long* while before\nthe diffstat even starts!\n\n Documentation/git-merge.txt     |    2 +-\n Documentation/merge-options.txt |    4 ++++\n git-merge.sh                    |   18 ++++++++++++------\n git-pull.sh                     |    3 +++\n 4 files changed, 20 insertions(+), 7 deletions(-)\n\ndiff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt\nindex 9c08efa..912ef29 100644\n--- a/Documentation/git-merge.txt\n+++ b/Documentation/git-merge.txt\n@@ -9,7 +9,7 @@ git-merge - Join two or more development histories together\n SYNOPSIS\n --------\n [verse]\n-'git-merge' [-n] [--no-commit] [--squash] [-s <strategy>]...\n+'git-merge' [-n] [--summary] [--no-commit] [--squash] [-s <strategy>]...\n \t[-m <msg>] <remote> <remote>...\n \n DESCRIPTION\ndiff --git a/Documentation/merge-options.txt b/Documentation/merge-options.txt\nindex 182cef5..56f1d8d 100644\n--- a/Documentation/merge-options.txt\n+++ b/Documentation/merge-options.txt\n@@ -1,3 +1,7 @@\n+--summary::\n+\tShow a diffstat at the end of the merge. The diffstat is also\n+\tcontrolled by the configuration option merge.diffstat.\n+\n -n, \\--no-summary::\n \tDo not show diffstat at the end of the merge.\n \ndiff --git a/git-merge.sh b/git-merge.sh\nindex 351676f..80f7de8 100755\n--- a/git-merge.sh\n+++ b/git-merge.sh\n@@ -3,7 +3,7 @@\n # Copyright (c) 2005 Junio C Hamano\n #\n \n-USAGE='[-n] [--no-commit] [--squash] [-s <strategy>] [-m=<merge-message>] <commit>+'\n+USAGE='[-n] [--summary] [--no-commit] [--squash] [-s <strategy>] [-m=<merge-message>] <commit>+'\n \n SUBDIRECTORY_OK=Yes\n . git-sh-setup\n@@ -88,12 +88,11 @@ finish () {\n \t'')\n \t\t;;\n \t?*)\n-\t\tcase \"$no_summary\" in\n-\t\t'')\n+\t\tif test \"$show_diffstat\" = t\n+\t\tthen\n \t\t\t# We want color (if set), but no pager\n \t\t\tGIT_PAGER='' git-diff --stat --summary -M \"$head\" \"$1\"\n-\t\t\t;;\n-\t\tesac\n+\t\tfi\n \t\t;;\n \tesac\n }\n@@ -126,7 +125,9 @@ do\n \tcase \"$1\" in\n \t-n|--n|--no|--no-|--no-s|--no-su|--no-sum|--no-summ|\\\n \t\t--no-summa|--no-summar|--no-summary)\n-\t\tno_summary=t ;;\n+\t\tshow_diffstat=false ;;\n+\t--summary)\n+\t\tshow_diffstat=t ;;\n \t--sq|--squ|--squa|--squas|--squash)\n \t\tsquash=t no_commit=t ;;\n \t--no-c|--no-co|--no-com|--no-comm|--no-commi|--no-commit)\n@@ -168,6 +169,11 @@ do\n \tshift\n done\n \n+if test -z \"$show_diffstat\"; then\n+    test \"$(git-config merge.diffstat)\" = false && show_diffstat=false\n+    test -z \"$show_diffstat\" && show_diffstat=t\n+fi\n+\n # This could be traditional \"merge <msg> HEAD <commit>...\"  and the\n # way we can tell it is to see if the second token is HEAD, but some\n # people might have misused the interface and used a committish that\ndiff --git a/git-pull.sh b/git-pull.sh\nindex a3665d7..ba0ca07 100755\n--- a/git-pull.sh\n+++ b/git-pull.sh\n@@ -22,6 +22,9 @@ do\n \t-n|--n|--no|--no-|--no-s|--no-su|--no-sum|--no-summ|\\\n \t\t--no-summa|--no-summar|--no-summary)\n \t\tno_summary=-n ;;\n+\t--summary)\n+\t\tno_summary=$1\n+\t\t;;\n \t--no-c|--no-co|--no-com|--no-comm|--no-commi|--no-commit)\n \t\tno_commit=--no-commit ;;\n \t--sq|--squ|--squa|--squas|--squash)\n-- \n1.5.2.36.g04e2-dirty\n"},{"id":"43045","messageId":"7vd50r2tpa.fsf@assigned-by-dhcp.cox.net","threadId":"8280","inReplyTo":"20070523195823.GA2554@steel.home","subject":"Re: [PATCH] disable merge summaries if they are disabled","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-05-23T20:03:45Z","receivedAt":"2007-05-23T20:03:45Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Alex Riesen <raa.lkml@gmail.com> writes:\n\n> Junio C Hamano, Wed, May 23, 2007 20:22:57 +0200:\n>> \"Alex Riesen\" <raa.lkml@gmail.com> writes:\n>> \n>> > Otherwise the merge.summary option has no visible effect.\n>> \n>> I suspect you are mistaking a different merge summary.  The\n>> option affects fmt-merge-msg, iow, the shortlog looking summary\n>> that appears as the commit message in a merge commit.\n>> \n>> The command line parameter --no-summary inhibits the diffstat\n>> given to the terminal after \"git-pull/git-merge\" is made.\n>> \n>\n> I did it again, didn't I?! :)\n\nYou could argue that it is not your fault but is a faulty and\nmisleading documentation, if you supply a patch to clarify it\n;-).\n"},{"id":"43046","messageId":"7v646j2t1e.fsf@assigned-by-dhcp.cox.net","threadId":"8280","inReplyTo":"20070523200223.GB2554@steel.home","subject":"Re: [PATCH] Add a configuration option to control diffstat after merge","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-05-23T20:18:05Z","receivedAt":"2007-05-23T20:18:05Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Alex Riesen <raa.lkml@gmail.com> writes:\n\n> The diffstat can be controlled either with command-line options\n> (--summary|--no-summary) or with merge.diffstat. The default is\n> left as it was: diffstat is active by default.\n>\n> Signed-off-by: Alex Riesen <raa.lkml@gmail.com>\n> ---\n>\n> I have to explain the implementation a bit: in Windows, every exec is\n> *very* expensive, so I tried to avoid a call to git-config as long as\n> possible. The stupid OS is my reason for this change, actually:\n> diffstat not just takes too long. It also takes a *long* while before\n> the diffstat even starts!\n\nEven on Linux, if your project is well modularized and your\nworkflow is \"merge small and merge often\" like the kernel is, it\nis not unusual that the final diffstat takes much longer than a\nmerge.  But the diffstat is not an eye-candy but is an important\nsafety measure from the workflow point of view.\n\n> @@ -168,6 +169,11 @@ do\n>  \tshift\n>  done\n>  \n> +if test -z \"$show_diffstat\"; then\n> +    test \"$(git-config merge.diffstat)\" = false && show_diffstat=false\n> +    test -z \"$show_diffstat\" && show_diffstat=t\n> +fi\n\nIsn't this hunk wrong?\n\n[merge]\n\tdiffstat = 0\n        diffstat = false\n\nshould both mean \"merge.diffstat is set to false\".\n\"git config --bool\" does that.\n\nAnd when merge.diffstat does not appear in the configuration\nfile, \"git config --bool merge.diffstat\" exits non-zero.\n\nif test -z \"$show_diffstat\"; then\n    test \"$(git-config --bool merge.diffstat)\" = false && show_diffstat=false\n    test -z \"$show_diffstat\" && show_diffstat=t\nfi\n"},{"id":"43048","messageId":"20070523204312.GD2554@steel.home","threadId":"8280","inReplyTo":"7v646j2t1e.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Add a configuration option to control diffstat after merge","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-05-23T20:43:12Z","receivedAt":"2007-05-23T20:43:12Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Junio C Hamano, Wed, May 23, 2007 22:18:05 +0200:\n> Alex Riesen <raa.lkml@gmail.com> writes:\n> \n> > The diffstat can be controlled either with command-line options\n> > (--summary|--no-summary) or with merge.diffstat. The default is\n> > left as it was: diffstat is active by default.\n> >\n> > Signed-off-by: Alex Riesen <raa.lkml@gmail.com>\n> > ---\n> >\n> > I have to explain the implementation a bit: in Windows, every exec is\n> > *very* expensive, so I tried to avoid a call to git-config as long as\n> > possible. The stupid OS is my reason for this change, actually:\n> > diffstat not just takes too long. It also takes a *long* while before\n> > the diffstat even starts!\n> \n> Even on Linux, if your project is well modularized and your\n> workflow is \"merge small and merge often\" like the kernel is, it\n> is not unusual that the final diffstat takes much longer than a\n> merge.  But the diffstat is not an eye-candy but is an important\n> safety measure from the workflow point of view.\n\nCan't have it on Windows. It makes me prefer git-am to git-merge.\n\n> > @@ -168,6 +169,11 @@ do\n> >  \tshift\n> >  done\n> >  \n> > +if test -z \"$show_diffstat\"; then\n> > +    test \"$(git-config merge.diffstat)\" = false && show_diffstat=false\n> > +    test -z \"$show_diffstat\" && show_diffstat=t\n> > +fi\n> \n> Isn't this hunk wrong?\n> \n\nIt is. Will resend in an hour, unless you beat me to it\n\n> if test -z \"$show_diffstat\"; then\n>     test \"$(git-config --bool merge.diffstat)\" = false && show_diffstat=false\n>     test -z \"$show_diffstat\" && show_diffstat=t\n> fi\n\nThanks!\n"},{"id":"43049","messageId":"20070523210129.GE2554@steel.home","threadId":"8280","inReplyTo":"20070523204312.GD2554@steel.home","subject":"[PATCH] Add a configuration option to control diffstat after merge","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-05-23T21:01:29Z","receivedAt":"2007-05-23T21:01:29Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"The diffstat can be controlled either with command-line options\n(--summary|--no-summary) or with merge.diffstat. The default is\nleft as it was: diffstat is active by default.\n\nSigned-off-by: Alex Riesen <raa.lkml@gmail.com>\n---\nAlex Riesen, Wed, May 23, 2007 22:43:12 +0200:\n> > > +if test -z \"$show_diffstat\"; then\n> > > +    test \"$(git-config merge.diffstat)\" = false && show_diffstat=false\n> > > +    test -z \"$show_diffstat\" && show_diffstat=t\n> > > +fi\n> > \n> > Isn't this hunk wrong?\n> > \n> \n> It is. Will resend in an hour, unless you beat me to it\n> \n> > if test -z \"$show_diffstat\"; then\n> >     test \"$(git-config --bool merge.diffstat)\" = false && show_diffstat=false\n> >     test -z \"$show_diffstat\" && show_diffstat=t\n> > fi\n> \n> Thanks!\n> \n\n Documentation/git-merge.txt     |    2 +-\n Documentation/merge-options.txt |    4 ++++\n git-merge.sh                    |   18 ++++++++++++------\n git-pull.sh                     |    3 +++\n 4 files changed, 20 insertions(+), 7 deletions(-)\n\ndiff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt\nindex 9c08efa..912ef29 100644\n--- a/Documentation/git-merge.txt\n+++ b/Documentation/git-merge.txt\n@@ -9,7 +9,7 @@ git-merge - Join two or more development histories together\n SYNOPSIS\n --------\n [verse]\n-'git-merge' [-n] [--no-commit] [--squash] [-s <strategy>]...\n+'git-merge' [-n] [--summary] [--no-commit] [--squash] [-s <strategy>]...\n \t[-m <msg>] <remote> <remote>...\n \n DESCRIPTION\ndiff --git a/Documentation/merge-options.txt b/Documentation/merge-options.txt\nindex 182cef5..56f1d8d 100644\n--- a/Documentation/merge-options.txt\n+++ b/Documentation/merge-options.txt\n@@ -1,3 +1,7 @@\n+--summary::\n+\tShow a diffstat at the end of the merge. The diffstat is also\n+\tcontrolled by the configuration option merge.diffstat.\n+\n -n, \\--no-summary::\n \tDo not show diffstat at the end of the merge.\n \ndiff --git a/git-merge.sh b/git-merge.sh\nindex 351676f..44e9b70 100755\n--- a/git-merge.sh\n+++ b/git-merge.sh\n@@ -3,7 +3,7 @@\n # Copyright (c) 2005 Junio C Hamano\n #\n \n-USAGE='[-n] [--no-commit] [--squash] [-s <strategy>] [-m=<merge-message>] <commit>+'\n+USAGE='[-n] [--summary] [--no-commit] [--squash] [-s <strategy>] [-m=<merge-message>] <commit>+'\n \n SUBDIRECTORY_OK=Yes\n . git-sh-setup\n@@ -88,12 +88,11 @@ finish () {\n \t'')\n \t\t;;\n \t?*)\n-\t\tcase \"$no_summary\" in\n-\t\t'')\n+\t\tif test \"$show_diffstat\" = t\n+\t\tthen\n \t\t\t# We want color (if set), but no pager\n \t\t\tGIT_PAGER='' git-diff --stat --summary -M \"$head\" \"$1\"\n-\t\t\t;;\n-\t\tesac\n+\t\tfi\n \t\t;;\n \tesac\n }\n@@ -126,7 +125,9 @@ do\n \tcase \"$1\" in\n \t-n|--n|--no|--no-|--no-s|--no-su|--no-sum|--no-summ|\\\n \t\t--no-summa|--no-summar|--no-summary)\n-\t\tno_summary=t ;;\n+\t\tshow_diffstat=false ;;\n+\t--summary)\n+\t\tshow_diffstat=t ;;\n \t--sq|--squ|--squa|--squas|--squash)\n \t\tsquash=t no_commit=t ;;\n \t--no-c|--no-co|--no-com|--no-comm|--no-commi|--no-commit)\n@@ -168,6 +169,11 @@ do\n \tshift\n done\n \n+if test -z \"$show_diffstat\"; then\n+    test \"$(git-config --bool merge.diffstat)\" = false && show_diffstat=false\n+    test -z \"$show_diffstat\" && show_diffstat=t\n+fi\n+\n # This could be traditional \"merge <msg> HEAD <commit>...\"  and the\n # way we can tell it is to see if the second token is HEAD, but some\n # people might have misused the interface and used a committish that\ndiff --git a/git-pull.sh b/git-pull.sh\nindex a3665d7..ba0ca07 100755\n--- a/git-pull.sh\n+++ b/git-pull.sh\n@@ -22,6 +22,9 @@ do\n \t-n|--n|--no|--no-|--no-s|--no-su|--no-sum|--no-summ|\\\n \t\t--no-summa|--no-summar|--no-summary)\n \t\tno_summary=-n ;;\n+\t--summary)\n+\t\tno_summary=$1\n+\t\t;;\n \t--no-c|--no-co|--no-com|--no-comm|--no-commi|--no-commit)\n \t\tno_commit=--no-commit ;;\n \t--sq|--squ|--squa|--squas|--squash)\n-- \n1.5.2.67.gbd3c2\n"}]}