From: Jim Meyering Date: Thu, 02 Sep 2010 08:20:33 GMT Subject: Re: [PATCH for next] insert missing newline in a diagnostic Message-ID: <87lj7kimjy.fsf@meyering.net> In-Reply-To: Matthieu Moy wrote: > Jonathan Nieder writes: > >> Jim Meyering wrote: >> >>> When merging, I would get a message like this: >>> >>> error: The following untracked working tree files would be overwritten by merge: >>> FILE_NAMEPlease move or remove them before you can merge. >>> >>> This change inserts the newline after FILE_NAME. >> >> I fear it is more complicated. With your patch, in some situations >> (e.g., when running t7609-merge-co-error-msgs.sh) I get a leading tab >> and extra newline: >> >> error: The following untrack... >> FILE_NAME >> >> Please move or remove them before you can merge. >> >> In unpack-trees, display_error_msgs() prints the version with a tab >> but you are getting the message from add_rejected_path which suggests >> to me that o->show_all_errors is unset. > > That sounds like an explanation. The patch series did two things: > override plumbing error messages, and introducing show_all_errors. The > two are meant to work together, and clearly, if you set one without > the other, you get surprising results. A fix would be to make sure > that we set both in the same places. Thanks to both of you. > Patch follows, untested. Jim, can you tell us whether it fixes the > problem? If not, can your give us a reproduction script (preferably as > a patch to t7609-merge-co-error-msgs.sh)? Matthieu, should your patch have gone to the mailing list? I do not see it there.