Re: [RFC PATCH v3 4/4] builtin/branch: give more useful error messages when renaming
- From
Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
- Date
- Nov 3, 2017, 02:41 UTC
- Message-ID
- <59d4a08d-7165-9e56-5ddc-4f97d4a9d4d4@gmail.com>
- In-Reply-To
- <CAPig+cRJDiHXoz-81EMtsbFfqaZz76eo1msUQW+eBP=wUsm6JA@mail.gmail.com>
On Thursday 02 November 2017 07:51 PM, Eric Sunshine wrote:
> > Nicely explained; easily understood. >
Good to hear that.
Show 16 quoted lines
> > 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 ";").
Show 8 quoted lines
> 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