# [PATCH] sequencer: fix missing newline

9 messages from 2017-03-23 to 2017-03-23. Participants: Brandon Williams, Johannes Schindelin, Junio C Hamano, Jeff King, Jonathan Nieder.
Thread: https://gitlist.dev/t/45483

## Brandon Williams, 2017-03-23 17:02

Subject: [PATCH] sequencer: fix missing newline
Message-ID: <20170323170233.50499-1-bmwill@google.com>
URL: https://gitlist.dev/e/20170323170233.50499-1-bmwill%40google.com

```
When using rebase --interactive where one of the lines is marked as
'edit' this is the resulting output:

    Stopped at ec3b9c4...  stuffYou can amend the commit now, with

      git commit --amend

    Once you are satisfied with your changes, run

      git rebase --continue

A newline character is missing at the end of the "Stopped at ..." line and
before the "You can amend ..." line.  This patch fixes the malformed output by
adding the missing newline character to the end of the "Stopped at ..." line.

Signed-off-by: Brandon Williams <bmwill@google.com>
---
 sequencer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sequencer.c b/sequencer.c
index 8183a83c1..d76dc9cb2 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -1998,7 +1998,7 @@ static int pick_commits(struct todo_list *todo_list, struct replay_opts *opts)
 				struct commit *commit = item->commit;
 				if (!res)
 					fprintf(stderr,
-						_("Stopped at %s...  %.*s"),
+						_("Stopped at %s...  %.*s\n"),
 						short_commit_name(commit),
 						item->arg_len, item->arg);
 				return error_with_patch(commit,
-- 
2.12.1.500.gab5fba24ee-goog


```

## Johannes Schindelin, 2017-03-23 17:40

Subject: Re: [PATCH] sequencer: fix missing newline
Message-ID: <alpine.DEB.2.20.1703231839570.3767@virtualbox>
URL: https://gitlist.dev/e/alpine.DEB.2.20.1703231839570.3767%40virtualbox
In-Reply-To: <20170323170233.50499-1-bmwill@google.com>

```
Hi Brandon,

On Thu, 23 Mar 2017, Brandon Williams wrote:

> When using rebase --interactive where one of the lines is marked as
> 'edit' this is the resulting output:
> 
>     Stopped at ec3b9c4...  stuffYou can amend the commit now, with

Ugh, I should have caught this. The warning() call implicitly adds a
newline, the fprintf() doesn't.

Patch is obviously good.

Thanks,
Dscho

```

## Brandon Williams, 2017-03-23 17:47

Subject: Re: [PATCH] sequencer: fix missing newline
Message-ID: <20170323174716.GA111250@google.com>
URL: https://gitlist.dev/e/20170323174716.GA111250%40google.com
In-Reply-To: <alpine.DEB.2.20.1703231839570.3767@virtualbox>

```
On 03/23, Johannes Schindelin wrote:
> Hi Brandon,
> 
> On Thu, 23 Mar 2017, Brandon Williams wrote:
> 
> > When using rebase --interactive where one of the lines is marked as
> > 'edit' this is the resulting output:
> > 
> >     Stopped at ec3b9c4...  stuffYou can amend the commit now, with
> 
> Ugh, I should have caught this. The warning() call implicitly adds a
> newline, the fprintf() doesn't.
> 
> Patch is obviously good.

All good.  If we're keeping score for finding each others bugs, I still
think you're winning :)

-- 
Brandon Williams

```

## Junio C Hamano, 2017-03-23 18:19

Subject: Re: [PATCH] sequencer: fix missing newline
Message-ID: <xmqqzigbdfeh.fsf@gitster.mtv.corp.google.com>
URL: https://gitlist.dev/e/xmqqzigbdfeh.fsf%40gitster.mtv.corp.google.com
In-Reply-To: <20170323170233.50499-1-bmwill@google.com>

```
Brandon Williams <bmwill@google.com> writes:

> When using rebase --interactive where one of the lines is marked as
> 'edit' this is the resulting output:
>
>     Stopped at ec3b9c4...  stuffYou can amend the commit now, with
>
>       git commit --amend
>
>     Once you are satisfied with your changes, run
>
>       git rebase --continue
>
> A newline character is missing at the end of the "Stopped at ..." line and
> before the "You can amend ..." line.  This patch fixes the malformed output by
> adding the missing newline character to the end of the "Stopped at ..." line.
>
> Signed-off-by: Brandon Williams <bmwill@google.com>
> ---
>  sequencer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Oops, obviously correct.  Thanks.

> diff --git a/sequencer.c b/sequencer.c
> index 8183a83c1..d76dc9cb2 100644
> --- a/sequencer.c
> +++ b/sequencer.c
> @@ -1998,7 +1998,7 @@ static int pick_commits(struct todo_list *todo_list, struct replay_opts *opts)
>  				struct commit *commit = item->commit;
>  				if (!res)
>  					fprintf(stderr,
> -						_("Stopped at %s...  %.*s"),
> +						_("Stopped at %s...  %.*s\n"),
>  						short_commit_name(commit),
>  						item->arg_len, item->arg);
>  				return error_with_patch(commit,

```

## Jeff King, 2017-03-23 18:22

Subject: Re: [PATCH] sequencer: fix missing newline
Message-ID: <20170323182221.i3noikxpmrn4ymi4@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20170323182221.i3noikxpmrn4ymi4%40sigill.intra.peff.net
In-Reply-To: <20170323174716.GA111250@google.com>

```
On Thu, Mar 23, 2017 at 10:47:16AM -0700, Brandon Williams wrote:

> On 03/23, Johannes Schindelin wrote:
> > Hi Brandon,
> > 
> > On Thu, 23 Mar 2017, Brandon Williams wrote:
> > 
> > > When using rebase --interactive where one of the lines is marked as
> > > 'edit' this is the resulting output:
> > > 
> > >     Stopped at ec3b9c4...  stuffYou can amend the commit now, with
> > 
> > Ugh, I should have caught this. The warning() call implicitly adds a
> > newline, the fprintf() doesn't.
> > 
> > Patch is obviously good.
> 
> All good.  If we're keeping score for finding each others bugs, I still
> think you're winning :)

It's my bug, actually. Brown paper bag, anyone?

-Peff

```

## Jeff King, 2017-03-23 18:24

Subject: Re: [PATCH] sequencer: fix missing newline
Message-ID: <20170323182414.n7qgw7x4qibkg72z@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20170323182414.n7qgw7x4qibkg72z%40sigill.intra.peff.net
In-Reply-To: <20170323182221.i3noikxpmrn4ymi4@sigill.intra.peff.net>

```
On Thu, Mar 23, 2017 at 02:22:21PM -0400, Jeff King wrote:

> > > > When using rebase --interactive where one of the lines is marked as
> > > > 'edit' this is the resulting output:
> > > > 
> > > >     Stopped at ec3b9c4...  stuffYou can amend the commit now, with
> > > 
> > > Ugh, I should have caught this. The warning() call implicitly adds a
> > > newline, the fprintf() doesn't.
> > > 
> > > Patch is obviously good.
> > 
> > All good.  If we're keeping score for finding each others bugs, I still
> > think you're winning :)
> 
> It's my bug, actually. Brown paper bag, anyone?

The most embarrassing part is that I've been running with this for days
and didn't notice. I guess I just gloss over the hint text.

-Peff

```

## Brandon Williams, 2017-03-23 18:24

Subject: Re: [PATCH] sequencer: fix missing newline
Message-ID: <20170323182424.GB111250@google.com>
URL: https://gitlist.dev/e/20170323182424.GB111250%40google.com
In-Reply-To: <20170323182221.i3noikxpmrn4ymi4@sigill.intra.peff.net>

```
On 03/23, Jeff King wrote:
> On Thu, Mar 23, 2017 at 10:47:16AM -0700, Brandon Williams wrote:
> 
> > On 03/23, Johannes Schindelin wrote:
> > > Hi Brandon,
> > > 
> > > On Thu, 23 Mar 2017, Brandon Williams wrote:
> > > 
> > > > When using rebase --interactive where one of the lines is marked as
> > > > 'edit' this is the resulting output:
> > > > 
> > > >     Stopped at ec3b9c4...  stuffYou can amend the commit now, with
> > > 
> > > Ugh, I should have caught this. The warning() call implicitly adds a
> > > newline, the fprintf() doesn't.
> > > 
> > > Patch is obviously good.
> > 
> > All good.  If we're keeping score for finding each others bugs, I still
> > think you're winning :)
> 
> It's my bug, actually. Brown paper bag, anyone?

TIL I should use 'blame' before actually blaming someone ;P

-- 
Brandon Williams

```

## Jonathan Nieder, 2017-03-23 22:12

Subject: Re: [PATCH] sequencer: fix missing newline
Message-ID: <20170323221217.GA20794@aiede.mtv.corp.google.com>
URL: https://gitlist.dev/e/20170323221217.GA20794%40aiede.mtv.corp.google.com
In-Reply-To: <20170323170233.50499-1-bmwill@google.com>

```
Brandon Williams wrote:

> When using rebase --interactive where one of the lines is marked as
> 'edit' this is the resulting output:
>
>     Stopped at ec3b9c4...  stuffYou can amend the commit now, with
[...]
> Signed-off-by: Brandon Williams <bmwill@google.com>
> ---
>  sequencer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks for fixing it.  I don't see any other fprintf in the file with
missing \r or \n at the end, so this fix looks complete.

Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>

```

## Junio C Hamano, 2017-03-23 22:38

Subject: Re: [PATCH] sequencer: fix missing newline
Message-ID: <xmqqbmsraaax.fsf@gitster.mtv.corp.google.com>
URL: https://gitlist.dev/e/xmqqbmsraaax.fsf%40gitster.mtv.corp.google.com
In-Reply-To: <20170323221217.GA20794@aiede.mtv.corp.google.com>

```
Jonathan Nieder <jrnieder@gmail.com> writes:

> Brandon Williams wrote:
>
>> When using rebase --interactive where one of the lines is marked as
>> 'edit' this is the resulting output:
>>
>>     Stopped at ec3b9c4...  stuffYou can amend the commit now, with
> [...]
>> Signed-off-by: Brandon Williams <bmwill@google.com>
>> ---
>>  sequencer.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Thanks for fixing it.  I don't see any other fprintf in the file with
> missing \r or \n at the end, so this fix looks complete.
>
> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>

Thanks.

```
