Git development
 help / color / mirror / Atom feed
From: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
To: git@vger.kernel.org
Subject: Guidlines for error messages
Date: Sat, 29 Jul 2017 08:27:58 +0530	[thread overview]
Message-ID: <1501297078.2711.2.camel@gmail.com> (raw)

Hello all,

On reading the CodingGuidelines, I saw a section that specifies rules
about the structure and formatting of error messages. I have reproduced
it below,


    Error Messages

     - Do not end error messages with a full stop.

     - Do not capitalize ("unable to open %s", not "Unable to open %s")

     - Say what the error is first ("cannot open %s", not "%s: cannot open")


Having used git all these days, I have seen error messages that do seem
to be violating the above guidelines (at least the first 2 points). A
few are,


    Aborting commit due to empty commit message.


    fatal: There is no merge to abort (MERGE_HEAD missing).


    fatal: You have not concluded your merge (MERGE_HEAD exists).
    Please, commit your changes before you merge.


    error: Empty commit message.
    Not committing merge; use 'git commit' to complete the merge.


    error: pathspec 'hell' did not match any file(s) known to git.


    fatal: Not a valid object name foo


    fatal: ambiguous argument 'foo..bar': unknown revision or path not in the working tree.
    Use '--' to separate paths from revisions, like this:
    'git <command> [<revision>...] -- [<file>...]'


A few that do seem to be following the guideline are

    fatal: could not read log file 'imaginary_file': No such file or directory

    fatal: no input file given for in-place editing



    That makes me wonder, has the guideline changed ?
    Is this something that must be fixed ?
    Am I missing something ?

    -- 
    Kaartic

             reply	other threads:[~2017-07-29  2:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-29  2:57 Kaartic Sivaraam [this message]
2017-07-29  3:57 ` Guidlines for error messages Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1501297078.2711.2.camel@gmail.com \
    --to=kaarticsivaraam91196@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox