Skip to contentSkip to conversation

sequencer: fix missing newline

PATCH In review Brandon Williams 5 participants 9 messages Mar 23, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sequencer: fix missing newline

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.

---
 sequencer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sequencer.c +1 -1
index 8183a83c1..d76dc9cb2 100644
@@ -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,
Signature · 1 line
2.12.1.500.gab5fba24ee-goog
#1 lore raw

Hi Brandon,

Quoted 4 lines · Brandon Williams

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

#2 lore raw
Quoted 7 lines · Johannes Schindelin

Hi Brandon,

Quoted 3 lines · Brandon Williams

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

Quoted 6 lines
Quoted 1 line

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 :)

Signature · 1 line
Brandon Williams
#3 lore raw
Quoted 10 lines · Brandon Williams
Quoted 9 lines · Johannes Schindelin

Hi Brandon,

Quoted 4 lines · Brandon Williams

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

Quoted 7 lines
Quoted 4 lines

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

#4 lore raw
Quoted 8 lines · Jeff King
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines

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.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

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

#5 lore raw
In reply to Jeff King
Quoted 15 lines · Jeff King
Quoted 13 lines · Brandon Williams
Quoted 12 lines · Johannes Schindelin

Hi Brandon,

Quoted 4 lines · Brandon Williams

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.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

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

Signature · 1 line
Brandon Williams
#6 lore raw
In reply to Brandon Williams
Quoted 11 lines · Brandon Williams

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

Quoted 8 lines

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.

---
 sequencer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Oops, obviously correct. Thanks.

Quoted 13 lines
sequencer.c +1 -1
index 8183a83c1..d76dc9cb2 100644
@@ -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,
Reviewed-by on v1 1/1
#7 lore raw
In reply to Brandon Williams
Quoted 4 lines · Brandon Williams

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

[...]

Quoted 4 lines
---
 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.

#8 lore raw
Quoted 12 lines · Jonathan Nieder
Quoted 4 lines · Brandon Williams

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

[...]

Quoted 4 lines
---
 sequencer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 4 lines

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.

Thanks.