From: "Shawn O. Pearce" <spearce@spearce.org>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: [PATCH] Change all git-status output to be "comments"
Date: Mon, 7 May 2007 22:13:56 -0400 [thread overview]
Message-ID: <20070508021355.GA22383@spearce.org> (raw)
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.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
wt-status.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/wt-status.c b/wt-status.c
index a055990..a9ba1ae 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -336,13 +336,13 @@ void wt_status_print(struct wt_status *s)
if (s->amend)
printf("# No changes\n");
else if (s->workdir_dirty)
- printf("no changes added to commit (use \"git add\" and/or \"git commit -a\")\n");
+ printf("# no changes added to commit (use \"git add\" and/or \"git commit -a\")\n");
else if (s->workdir_untracked)
- printf("nothing added to commit but untracked files present (use \"git add\" to track)\n");
+ printf("# nothing added to commit but untracked files present (use \"git add\" to track)\n");
else if (s->is_initial)
- printf("nothing to commit (create/copy files and use \"git add\" to track)\n");
+ printf("# nothing to commit (create/copy files and use \"git add\" to track)\n");
else
- printf("nothing to commit (working directory clean)\n");
+ printf("# nothing to commit (working directory clean)\n");
}
}
--
1.5.2.rc2.716.gba45c
next reply other threads:[~2007-05-08 2:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-08 2:13 Shawn O. Pearce [this message]
2007-05-08 21:07 ` [PATCH] Change all git-status output to be "comments" 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=20070508021355.GA22383@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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