Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Change all git-status output to be "comments"
Date: Tue, 08 May 2007 14:07:12 -0700	[thread overview]
Message-ID: <7v3b272fen.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20070508021355.GA22383@spearce.org> (Shawn O. Pearce's message of "Mon, 7 May 2007 22:13:56 -0400")

"Shawn O. Pearce" <spearce@spearce.org> writes:

> You wouldn't believe how many of my merge commits end with
> the following message from git-status:
>
>   "nothing to commit (working directory clean)"
>
> This happens because of the way I sometimes create (and resolve)
> some types of merges.  My commit message buffer gets prepped with
> the output of git-status, which has this nice message way down at the
> bottom of the file, below a large-ish block of lines that start with
> "#".  Since git-commit strips those lines, I always fail to see the
> trailing line that doesn't start with "#" and consequently fail to
> see that "nothing to commit ..." will be part of my merge message.
>
> So always comment out the output of git-status.

I think a better change would be to remove the 'nothing to
commit' when recording a merge.  The tool strongly discourage
creating an empty commit (iow, "diff-tree it^ it" is empty) for
a single parent case, while a merge that ends up (even when you
did not use "ours" strategy but resolved "fixing the same bug,
but differently" conflicts by hand) nullifying everything the
other side did is a perfectly normal merge.

I do not have a strong feeling against saying '# ' in front of
'nothing to commit' in the non-merge cases, other than that the
current one makes the 'nothing to commit' message itself stand
out in 'git status' output.  There also is a small issue of
updating the documentation and retraining people.  We need to
grep and replace them in the documentation and tutorial, and
start telling people who learn older copies of documentation
google finds that the older git said things slightly
differently.

      reply	other threads:[~2007-05-08 21:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-08  2:13 [PATCH] Change all git-status output to be "comments" Shawn O. Pearce
2007-05-08 21:07 ` Junio C Hamano [this message]

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=7v3b272fen.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=spearce@spearce.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