From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id CC4CF3858012 for ; Tue, 15 Jun 2021 13:12:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CC4CF3858012 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-568-HtzoEkaXP6u1P5pdOtv76g-1; Tue, 15 Jun 2021 09:12:43 -0400 X-MC-Unique: HtzoEkaXP6u1P5pdOtv76g-1 Received: by mail-wr1-f70.google.com with SMTP id k25-20020a5d52590000b0290114dee5b660so8618447wrc.16 for ; Tue, 15 Jun 2021 06:12:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uAOXYAA2Sgj1Nur1TWLld7KugmgPoZvwy7R34gQPEhw=; b=ouyRuol7+Sto8UgdQSW5ficdHV1wxZQnkpEocSinyVtoB2yPYIFN3k0bFLtgxooz8O //sdjq5C3gWuLl9VAFZeCmuCvMFCqUJnj/4cBfGgXDb55kPH9vamYqPvqcUK1yhZDezN 2OnVLWqn3KaBcrpRCMENoPPID/S09zFtnhA/5HeCCSjUw2n75OeY0mtwaJYmH1H37E26 UHEvuM0DHtdBt91FB2IM+L6AozsMVpI96gbHx9qMykAmZkew2hXWfW4hyLcwo4i+VBJc uvfIV9Doi4w8SzoyUlJonNIplu6k/r2bA3pUSY6Kyluc2v9J+lTtKM9bdXiA/Rw2N0MC 9K5w== X-Gm-Message-State: AOAM5304BZ/olFrfCcW0FH4ZHagkbXc4rwxZxMAS1w/N1XnykGrYVBKz xzaO4N2ltbC/G+Qd0FnbrI5fbkmOzzMyMRl606S/kyvfy/7fvbgy20qvLCVmka5SNqmWUoCB+I1 EWe50Ho+BE8S5VB4L9RZQxvRrvbWqNiS3WQ== X-Received: by 2002:a5d:6409:: with SMTP id z9mr2469831wru.279.1623762762608; Tue, 15 Jun 2021 06:12:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0r+IOM+851z3633SmwhmOPxXgSgSpGJ9BZ9/C/jJIsAC5nyCGF0hvFXoPiIss1K3TXhLFAFwXdSi9BuSJKAI= X-Received: by 2002:a5d:6409:: with SMTP id z9mr2469790wru.279.1623762762286; Tue, 15 Jun 2021 06:12:42 -0700 (PDT) MIME-Version: 1.0 References: <20210615120053.GB5077@gate.crashing.org> In-Reply-To: <20210615120053.GB5077@gate.crashing.org> From: Jonathan Wakely Date: Tue, 15 Jun 2021 14:12:31 +0100 Message-ID: Subject: Re: [RFC] [wwwdocs] Rewrite docs on commit message and patch format To: Segher Boessenkool Cc: gcc Patches , Martin Sebor X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2021 13:12:47 -0000 On Tue, 15 Jun 2021 at 14:03, Segher Boessenkool wrote: > > On Mon, Jun 14, 2021 at 05:25:56PM +0100, Jonathan Wakely via Gcc-patches wrote: > > We don't currently say document anything about commit format for the > > wwwdocs repo. Should the "wwwdocs" be a classifier (as in this email) > > or a component tag? > > I use proper components for wwwdocs as well, and when I send the patch > to gcc-patches@ I replace the [PATCH] by [wwwdocs]. It shouls not end > up in the repository after all, but we do need it in the mail. > > > +

Subject line

> > + > > +

The first line of the commit message contains a brief summary that > > +encapsulates the intent of the change. > > +For example: cleanup check_field_decls. > > +Although, very short, the summary should be distinct so that it will > > +not be confused with other patches.

> > + > > +Additionally, the subject should begin with a component tag, followed by > > +an optional series identifier. When related to one or more bugs, > > +it should end with the bug numbers. > > + > > +

Ideally, the entire subject line should not exceed 75 characters.

> > This is very wrong, and the cause of all other imperfections in this > proposal: the ideal subject line length is only 50 chars, so that all > important info in it shows up in a mail reader, and in gitk, tig, > git log --oneline, whatnot. This has been a settled debate since > forever and a day, don't try to redo it :-/ The existing docs say 75 chars: https://gcc.gnu.org/contribute.html#patches The frustrating thing about this proposal is that all I'm really trying to do is restructure the existing policies to be documented in more sensible places, and everybody is picking holes in the existing policy as though I'm introducing it. > > > +

Component tags

> > If done properly you can put more info in a subject line by starting it > with the area the patch is about. If done improperly you can blow the > 50 chars length limit here already. > > > +

Series identifier

> > + > > +

The series identifier is optional and is only relevant if a number of > > +patches are needed in order to effect an overall change. It should be > > +a short string that identifies the series (it is common to all > > +commits in the series) and should be followed by a single dash surrounded > > +by white space.

> > A "series identifier" does not belong in commits, only in the emails, > and you should use a tool (like git send-email) that handles this > automatically. And the exact format is [PATCH m/n]. Sometimes people > add a "v2" or similar in there -- stuff in square brackets is deleted > when the patch is committed, so that is fine. I didn't invent this, it's the existing policy: https://gcc.gnu.org/contribute.html#patches The [PATCH v2] or [PATCH m/n] is part of the "classifier", which is separate from the "series identifier" you're objecting to. The m/n part is called a "series marker" within the "classifier". > > > +

Bug number

> > + > > +

If your patch is related to a bug in the compiler for which there is an > > +existing PR number, the bug number should be stated. Use the > > The bug number *can* be stated. Again, you're objecting to the current text: https://gcc.gnu.org/contribute.html#patches > > > +short-form variant [PRnnnnn] without the bugzilla > > +component identifier and with no space between 'PR' and the number. > > +The body of the commit message should still contain the full form > > +(PR <component>/nnnnn) so that Bugzilla > > +will correctly notice the commit. > > Not the body anywhere, it should be in the changelog. That's the current text: https://gcc.gnu.org/contribute.html#patches > > +If your patch relates to two bugs, then write > > +[PRnnnnn, PRmmmmm]. > > This is too long usually. That's the current text: https://gcc.gnu.org/contribute.html#patches > The most important thing is this should be at the *end* of the subject, > so that more important info is readable. It can be nice if it is in the > subject of course, makes it a bit easier to search for, but it is mostly > irrelevant when scanning the commit log, or reading emails even. I know > what bug PR323 is, but we have six-digit numbers now, you will recognise > only the few you spent most time with recently. > > - - - > > IMNSHO this all should emphasise *why* these things are recommended, and > don't pretend these are "rules" at all. They are not. The important > thing is to make it easy for *others* to work with your patches. Adding > frivolities does not help; concise, well-phrased, terse *does* help. If I was trying to improve the current policy, I would agree. I'm not. I'm just trying to move the existing text around, without significant changes to the content of that text. I'm all for improving the policies, but that's not what I'm trying to do here. I would like to move things to a more sensible place **first** and then we can improve them.