git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: sequencer "edit" command always issues a warning

From
Jeff King <peff@peff.net>
Date
Mar 17, 2017, 00:19 UTC
Message-ID
<20170317001942.2lndsi47kdyzhane@sigill.intra.peff.net>
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
Previous: Johannes Schindelin
Message 4 of 4 in “sequencer "edit" command always issues a warning”
  1. Jeff KingMar 16, 2017
  2. Junio C HamanoMar 16, 2017
  3. Johannes SchindelinMar 16, 2017
  4. Jeff KingMar 17, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.