From: Thiago Farina Date: Sun, 05 Sep 2010 15:06:33 GMT Subject: Re: [PATCH] Make commit help text more accurate for --verbose Message-ID: In-Reply-To: <1283680383-12495-1-git-send-email-ramana.kumar@gmail.com> Hi Ramana, Some *style* comments below. On Sun, Sep 5, 2010 at 6:53 AM, Ramana Kumar wrote: >                fprintf(fp, >                        "\n" >                        "# Please enter the commit message for your changes."); > -               if (cleanup_mode == CLEANUP_ALL) > +               if (cleanup_mode == CLEANUP_ALL && !verbose) >                        fprintf(fp, >                                " Lines starting\n" >                                "# with '#' will be ignored, and an empty" >                                " message aborts the commit.\n"); The Documentation/CodingStyle says to avoid using braces unncessary. But since this is not a single line statement, like: if (foo) foo = x; Could you wrapp this into { } ? > -               else /* CLEANUP_SPACE, that is. */ > -                       fprintf(fp, > -                               " Lines starting\n" > -                               "# with '#' will be kept; you may remove them" > -                               " yourself if you want to.\n" > -                               "# An empty message aborts the commit.\n"); > +    else { > +      if (cleanup_mode == CLEANUP_ALL) > +        fprintf(fp, > +          " Lines starting\n" > +          "# with '#' will be ignored, as will" > +          " the diff and anything below it.\n"); Same thing here (and below) as pointed above. > +      else { /* CLEANUP_SPACE, that is. */ > +        fprintf(fp, > +          " Lines starting\n" > +          "# with '#' will be kept; you may remove them" > +          " yourself if you want to.\n"); > +        if (verbose) > +          fprintf(fp, > +            "# The diff and anything below it will be ignored.\n"); > +      } > +      fprintf(fp, "# An empty message aborts the commit.\n"); > +    } >                if (only_include_assumed) >                        fprintf(fp, "# %s\n", only_include_assumed); >