From: Gabriel <g2p.code@gmail.com>
To: git@vger.kernel.org
Cc: Gabriel <g2p.code@gmail.com>
Subject: [PATCH] Make commit, cherry-pick and revert more silent.
Date: Sun, 6 Jan 2008 16:43:21 +0100 [thread overview]
Message-ID: <1199634201-26013-1-git-send-email-g2p.code@gmail.com> (raw)
Commit now obeys --quiet more.
Cherry-pick and revert call commit as --quiet.
Prevents us from displaying working-tree status once or even twice.
---
builtin-commit.c | 4 +++-
builtin-revert.c | 6 ++++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/builtin-commit.c b/builtin-commit.c
index 73f1e35..96ace77 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -759,7 +759,9 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
if (!prepare_log_message(index_file, prefix) && !in_merge &&
!allow_empty && !(amend && is_a_merge(head_sha1))) {
- run_status(stdout, index_file, prefix, 0);
+ fprintf(stderr, "There are no changes, not committing.\n");
+ if (!quiet)
+ run_status(stdout, index_file, prefix, 0);
rollback_index_files();
unlink(commit_editmsg);
return 1;
diff --git a/builtin-revert.c b/builtin-revert.c
index 4bf8eb2..b925358 100644
--- a/builtin-revert.c
+++ b/builtin-revert.c
@@ -392,9 +392,11 @@ static int revert_or_cherry_pick(int argc, const char **argv)
if (!no_commit) {
if (edit)
- return execl_git_cmd("commit", "-n", NULL);
+ return execl_git_cmd("commit", "--quiet",
+ "-n", NULL);
else
- return execl_git_cmd("commit", "-n", "-F", defmsg, NULL);
+ return execl_git_cmd("commit", "--quiet",
+ "-n", "-F", defmsg, NULL);
}
if (reencoded_message)
free(reencoded_message);
--
1.5.4.rc2.39.g00d2
next reply other threads:[~2008-01-06 15:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-06 15:43 Gabriel [this message]
2008-01-06 22:52 ` [PATCH] Make commit, cherry-pick and revert more silent Junio C Hamano
2008-01-07 8:55 ` Gabriel
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=1199634201-26013-1-git-send-email-g2p.code@gmail.com \
--to=g2p.code@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.