All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: sequencer "edit" command always issues a warning
Date: Thu, 16 Mar 2017 23:59:35 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.20.1703162358520.3767@virtualbox> (raw)
In-Reply-To: <20170316131534.4vpbub3vmde7maua@sigill.intra.peff.net>

Hi Peff,

On Thu, 16 Mar 2017, Jeff King wrote:

> I was rebasing with the new built-in sequencer code today, and I was
> surprised to see the use of warning() here:
> 
>   $ git rebase -i
>   [set one commit to 'edit']
>   warning: stopped at 6ce6b914a... odb_pack_keep(): stop generating keepfile name
>   You can amend the commit now, with
>     [...more instructions...]
> 
> It alarmed me for a minute until I realized that no, this is nothing to
> be alarmed about, but just git doing exactly what I told it to do.
> 
> The original just wrote:
> 
>   Stopped at 6ce6b914a... odb_pack_keep(): stop generating keepfile name
> 
> It would be easy to switch back:
> 
> 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,
> 
> and that would match most of the other messages that the command issues,
> which use a bare fprintf() and start with a capital letter. But I'm not
> sure if there was some reason to treat this one differently.

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

Ciao,
Dscho

  parent reply	other threads:[~2017-03-16 22:59 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 [this message]
2017-03-17  0:19   ` Jeff King

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=alpine.DEB.2.20.1703162358520.3767@virtualbox \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.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 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.