# Re: \[RFC PATCH v3 4/4\] builtin/branch: give more useful error messages when renaming

- From: Kaartic Sivaraam \<hidden\>
- Date: 2017-11-03 02:41:33 
- List: git
- Page: https://ratatoskr.run/git/2017/11/7741494
- Thread: https://ratatoskr.run/git/2017/07/7730050/t.md

```text
On Thursday 02 November 2017 07:51 PM, Eric Sunshine wrote:
>
> Nicely explained; easily understood.
>

Good to hear that.


>
> Translators can correct me, but this smells like "sentence lego"[1],
> which we'd like to avoid. Translators lack full context when presented
> with bits and pieces of a sentence like this, thus the translation may
> be of poor quality; it may even be entirely incorrect since they don't
> necessarily know how you will be composing the various pieces.
>
> You _might_ be able to able to resolve this by dropping "and" from:
>
>      "foo is moo, and bar is boo"
>
> to turn the error messages into independent clauses:
>
>      "foo is moo; bar is boo"
> > but I'm no translator, and even that may fail the lego sniff test.
>
Though I can't be very sure that the one you suggested will pass the "lego sniff test", its better than the "and" I used. Further, my instinct says it wouldn't qualify as sentence lego (it's just a ";").


> A sure-fire way to avoid lego construction would be simply to emit
> each messages on its own line:
>
>      fatal: branch 'tset' doesn't exist
>      fatal: branch 'master' already exists
>
> (though, you might consider that too ugly).
>

Though it might not look that ugly, I don't know how you could make 'git' die() twice (or am I missing something)! Of course we could use 'error()' to report the errors and then 'die()' with a message like "Branch rename failed" but I find that to be a little too verbose and further using the connector ";" instead of "and" does seem to reduce the possibilities for the above program fragment to pass the "lego sniff test".

---
Kaartic
```
