Re: [PATCH v2 24/25] sequencer: quote filenames in error messages

2016-10-06 Thread Johannes Schindelin
Hi Junio,

On Sun, 11 Sep 2016, Junio C Hamano wrote:

> Johannes Schindelin  writes:
> 
> > This makes the code consistent by fixing quite a couple of error messages.
> 
> Looks OK.  While at it, we may want another one to downcase the
> first word, perhaps?
> 
> These may not be messages added by your series and can be left
> outside this series, but I have to point out that
> 
> if (commit_lock_file(&msg_file) < 0)
> return error(_("Error wrapping up '%s'."), filename);
> 
> results in "error: Error wrapping up", which sounds quite funny.
> 
> "failed to finalize" or something would flow a bit better, I'd say.

Fair enough. I added a patch to make it so.

Thanks,
Dscho


Re: [PATCH v2 24/25] sequencer: quote filenames in error messages

2016-09-11 Thread Junio C Hamano
Johannes Schindelin  writes:

> This makes the code consistent by fixing quite a couple of error messages.

Looks OK.  While at it, we may want another one to downcase the
first word, perhaps?

These may not be messages added by your series and can be left
outside this series, but I have to point out that

if (commit_lock_file(&msg_file) < 0)
return error(_("Error wrapping up '%s'."), filename);

results in "error: Error wrapping up", which sounds quite funny.

"failed to finalize" or something would flow a bit better, I'd say.

> diff --git a/sequencer.c b/sequencer.c
> index 1e7f29e..465e018 100644
> --- a/sequencer.c
> +++ b/sequencer.c
> @@ -255,7 +255,7 @@ static int write_with_lock_file(const char *filename,
>   if (append_eol && write(msg_fd, "\n", 1) < 0)
>   return error_errno(_("Could not write eol to '%s"), filename);
>   if (commit_lock_file(&msg_file) < 0)
> - return error(_("Error wrapping up %s."), filename);
> + return error(_("Error wrapping up '%s'."), filename);
>  
>   return 0;
>  }