summaryrefslogtreecommitdiff
path: root/Documentation/git-commit-tree.txt
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2012-05-21 23:10:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-05-22 16:08:20 (GMT)
commit2f70587502b6b5a8cfda5a3eff54392f48e2db8d (patch)
tree444e6b44d4b083958ba642b9217dacecb32ef382 /Documentation/git-commit-tree.txt
parent8587ead78ad3d2af760270b21035ffe48fde3e7b (diff)
downloadgit-2f70587502b6b5a8cfda5a3eff54392f48e2db8d.zip
git-2f70587502b6b5a8cfda5a3eff54392f48e2db8d.tar.gz
git-2f70587502b6b5a8cfda5a3eff54392f48e2db8d.tar.bz2
ident: report passwd errors with a more friendly message
When getpwuid fails, we give a cute but cryptic message. While it makes sense if you know that getpwuid or identity functions are being called, this code is triggered behind the scenes by quite a few git commands these days (e.g., receive-pack on a remote server might use it for a reflog; the current message is hard to distinguish from an authentication error). Let's switch to something that gives a little more context. While we're at it, we can factor out all of the cut-and-pastes of the "you don't exist" message into a wrapper function. Rather than provide xgetpwuid, let's make it even more specific to just getting the passwd entry for the current uid. That's the only way we use getpwuid anyway, and it lets us make an even more specific error message. The current message also fails to mention errno. While the usual cause for getpwuid failing is that the user does not exist, mentioning errno makes it easier to diagnose these problems. Note that POSIX specifies that errno remain untouched if the passwd entry does not exist (but will be set on actual errors), whereas some systems will return ENOENT or similar for a missing entry. We handle both cases in our wrapper. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-commit-tree.txt')
-rw-r--r--Documentation/git-commit-tree.txt5
1 files changed, 0 insertions, 5 deletions
diff --git a/Documentation/git-commit-tree.txt b/Documentation/git-commit-tree.txt
index eb12b2d..eb8ee99 100644
--- a/Documentation/git-commit-tree.txt
+++ b/Documentation/git-commit-tree.txt
@@ -88,11 +88,6 @@ for one to be entered and terminated with ^D.
include::date-formats.txt[]
-Diagnostics
------------
-You don't exist. Go away!::
- The passwd(5) gecos field couldn't be read
-
Discussion
----------