git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: sequencer "edit" command always issues a warning
Date: Thu, 16 Mar 2017 20:19:42 -0400	[thread overview]
Message-ID: <20170317001942.2lndsi47kdyzhane@sigill.intra.peff.net> (raw)
In-Reply-To: <alpine.DEB.2.20.1703162358520.3767@virtualbox>

On Thu, Mar 16, 2017 at 11:59:35PM +0100, Johannes Schindelin wrote:

> I do not recall why I chose warning(); probably just an oversight on my
> part. Your patch looks good.

Thanks. Here it is with a commit message.

I agree with Junio that if we had "info()" it would perhaps be the right
thing to use. We can go down that road later if we choose to.

-- >8 --
Subject: [PATCH] sequencer: drop "warning:" when stopping for edit

Since the conversion from shell to C in 56dc3ab04 (sequencer
(rebase -i): implement the 'edit' command, 2017-01-02),
stopping at an "edit" instruction went from:

  $ git rebase -i
  Stopped at 6ce6b914a... odb_pack_keep(): stop generating keepfile name
  You can amend the commit now, with
    [...more instructions...]

to:

  $ git rebase -i
  warning: stopped at 6ce6b914a... odb_pack_keep(): stop generating keepfile name
  You can amend the commit now, with
    [...more instructions...]

The "warning" implies that it's something unexpected, but
it's not. Let's switch back to the original message.

Signed-off-by: Jeff King <peff@peff.net>
---
 sequencer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sequencer.c b/sequencer.c
index 1f729b053..8183a83c1 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -1997,7 +1997,8 @@ static int pick_commits(struct todo_list *todo_list, struct replay_opts *opts)
 			if (item->command == TODO_EDIT) {
 				struct commit *commit = item->commit;
 				if (!res)
-					warning(_("stopped at %s... %.*s"),
+					fprintf(stderr,
+						_("Stopped at %s...  %.*s"),
 						short_commit_name(commit),
 						item->arg_len, item->arg);
 				return error_with_patch(commit,
-- 
2.12.0.623.g86ec6c963


      reply	other threads:[~2017-03-17  0:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-16 13:15 sequencer "edit" command always issues a warning Jeff King
2017-03-16 22:29 ` Junio C Hamano
2017-03-16 22:59 ` Johannes Schindelin
2017-03-17  0:19   ` Jeff King [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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20170317001942.2lndsi47kdyzhane@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).