From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Ramana Kumar <ramana@member.fsf.org>, git@vger.kernel.org
Subject: Re: [PATCH 3/3] commit: give a hint when a commit message has been abandoned
Date: Mon, 23 Jul 2012 17:43:39 -0400 [thread overview]
Message-ID: <20120723214339.GA13931@sigill.intra.peff.net> (raw)
In-Reply-To: <7veho2jh4q.fsf@alter.siamese.dyndns.org>
On Mon, Jul 23, 2012 at 02:35:01PM -0700, Junio C Hamano wrote:
> > +FILES
> > +-----
> > +
> > +`$GIT_DIR/COMMIT_EDITMSG`::
> > + This file contains the commit message of a commit in progress.
> > + If `git-commit` exits due to an error before creating a commit,
> > + any commit message that has been provided by the user (e.g., in
> > + an editor session) will be available in this file, but will be
> > + overwritten by the next invocation of `git-commit`.
> >
> > SEE ALSO
> > --------
>
> Very sensible, modulo s/git-commit/git commit/ and lack of S-o-b.
Yeah, I'm used to using the dashed form in documentation, but it's
probably reasonable to use the normal spaced form here. I assume you can
forge my S-o-b?
> I also wondered if something like the following might be useful, but
> it probably falls into the "water under the bridge" category.
>
> builtin/commit.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/builtin/commit.c b/builtin/commit.c
> index 149e07d..83bcee4 100644
> --- a/builtin/commit.c
> +++ b/builtin/commit.c
> @@ -768,6 +768,11 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
> "with '#' will be kept; you may remove them"
> " yourself if you want to.\n"
> "An empty message aborts the commit.\n"));
> + status_printf(s, GIT_COLOR_NORMAL,
> + _("The file '%s' keeps a copy of the log message\n"
> + "you edited, if you wish to inspect it later.\n"
> + "It will be wiped by the next invocation of 'git commit'.\n"),
> + git_path("COMMIT_EDITMSG"));
That seems excessive, as it is inside the file itself. Unless your
editor is terrible, it already shows you that information.
-Peff
next prev parent reply other threads:[~2012-07-23 21:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAMej=25=xj61pc+k42dv3byuBqUJzW21Sz+BXwoufqnKwV5Bbg@mail.gmail.com>
2012-07-21 14:26 ` empty ident name trashes commit message Ramana Kumar
2012-07-23 17:27 ` Jeff King
2012-07-23 18:05 ` Ramana Kumar
2012-07-23 18:46 ` Jeff King
2012-07-23 18:48 ` [PATCH 1/3] advice: pass varargs to strbuf_vaddf, not strbuf_addf Jeff King
2012-07-23 18:50 ` [PATCH 2/3] commit: check committer identity more strictly Jeff King
2012-07-23 20:51 ` Junio C Hamano
2012-07-23 20:53 ` Jeff King
2012-07-23 18:52 ` [PATCH 3/3] commit: give a hint when a commit message has been abandoned Jeff King
2012-07-23 20:49 ` Junio C Hamano
2012-07-23 20:52 ` Jeff King
2012-07-23 21:00 ` Junio C Hamano
2012-07-23 21:13 ` Jeff King
2012-07-23 21:35 ` Junio C Hamano
2012-07-23 21:43 ` Jeff King [this message]
2012-07-23 22:09 ` 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=20120723214339.GA13931@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ramana@member.fsf.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;
as well as URLs for NNTP newsgroup(s).