Re: [PATCH 14/14] pull --rebase: error on no merge candidate cases
- From
Paul Tan <pyokagan@gmail.com>
- Date
- May 22, 2015, 13:48 UTC
- Message-ID
- <CACRoPnR=ajnzvX42jwSpaYE1fgd2J-Ph7+_s=ch=OQJf5FRpQQ@mail.gmail.com>
- In-Reply-To
- <xmqqoalg8re2.fsf@gitster.dls.corp.google.com>
On Wed, May 20, 2015 at 12:27 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 13 quoted lines
> Johannes Schindelin <johannes.schindelin@gmx.de> writes:
>
>>>> - fprintf(stderr,
>>>> - _("There are no candidates for merging among the refs that you just fetched.\n"
>>>> - "Generally this means that you provided a wildcard refspec which had no\n"
>>>> - "matches on the remote end.\n"));
>>>> + if (opt_rebase)
>>>> + fputs(_("There is no candidate for rebasing against among the refs that you just fetched."), stderr);
>>>
>> The puts() function appends a <newline> while fputs() does not.
>
> Yup, so this update makes the command spew unterminated lines, which
> not something intended...Ugh >< Will put the "\n" back.
And yes, I used fputs() because it seems wasteful to use fprintf() which will scan the string looking for any '%' formatting units, when we know there aren't.
I will also update 05/14 to use fputs() as well where appropriate.
Thanks, Paul