From: Junio C Hamano Date: Fri, 09 Dec 2011 23:58:06 GMT Subject: Re: [PATCH 4/7] refactor git_getpass into generic prompt function Message-ID: <7vzkf1b8mp.fsf@alter.siamese.dyndns.org> In-Reply-To: <20111208083133.GD26409@sigill.intra.peff.net> Jeff King writes: > 2. The first series had a special "name" parameter just for generating > error messages. This drops it in the name of simplicity, so error > messages have gone from (assuming you don't have a tty): > > Could not read password: No such device or address > > to: > > Could not read 'Username for 'https://example.com': ': No such > device or address > > which is verbose, yes, but contains a little more useful > information. The formatting is rather unfortunate,... It also would be unpleasant to i18n it, I suspect. > + r = getpass(prompt); > + if (!r) > + die_errno("could not read '%s'", prompt); Taking advantage of the "prompt-string"-ness of the message, this might be a cuter workaround: fatal: Password: <> But I do not think it matters that much. Let's queue what you have, and work out these details in-tree.