1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-01 23:07:55 +01:00
git/Documentation
Jeff King 2f70587502 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>
2012-05-22 09:08:20 -07:00
..
howto correct spelling: an URL -> a URL 2012-03-28 08:47:23 -07:00
pt_BR
RelNotes Update draft release notes to 1.7.11 (11th batch) 2012-05-11 11:40:43 -07:00
technical Merge branch 'jk/doc-asciidoc-inline-literal' 2012-05-02 13:51:45 -07:00
.gitattributes
.gitignore Documentation: ignore *.pdf files 2011-08-08 09:30:12 -07:00
asciidoc.conf
blame-options.txt use -h for synopsis and --help for manpage consistently 2011-10-05 10:47:10 -07:00
build-docdep.perl
cat-texi.perl
cmd-list.perl
CodingGuidelines CodingGuidelines: do not use 'which' in shell scripts 2012-02-27 15:10:23 -08:00
config.txt Merge branch 'ct/advise-push-default' into maint 2012-05-11 11:18:43 -07:00
date-formats.txt
diff-config.txt diff --stat: add config option to limit graph width 2012-03-01 09:15:58 -08:00
diff-format.txt
diff-generate-patch.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
diff-options.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
docbook-xsl.css
docbook.xsl
everyday.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
fetch-options.txt
fix-texi.perl
git-add.txt
git-am.txt Merge branch 'jb/am-include' 2012-04-20 15:49:16 -07:00
git-annotate.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-apply.txt
git-archimport.txt
git-archive.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-bisect-lk2009.txt
git-bisect.txt bisect: add support for bisecting bare repositories 2011-08-09 10:26:18 -07:00
git-blame.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-branch.txt Merge branch 'nd/columns' 2012-05-03 15:13:31 -07:00
git-bundle.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-cat-file.txt
git-check-attr.txt Teach '--cached' option to check-attr 2011-09-22 16:38:22 -07:00
git-check-ref-format.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-checkout-index.txt
git-checkout.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-cherry-pick.txt Merge branch 'jk/doc-asciidoc-inline-literal' 2012-05-02 13:51:45 -07:00
git-cherry.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-citool.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-clean.txt Documentation: clarify "git clean -e <pattern>" 2011-08-28 23:47:55 -07:00
git-clone.txt clone: allow --branch to take a tag 2012-01-16 16:26:26 -08:00
git-column.txt Add column layout skeleton and git-column 2012-04-27 09:26:37 -07:00
git-commit-tree.txt ident: report passwd errors with a more friendly message 2012-05-22 09:08:20 -07:00
git-commit.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-config.txt Merge branch 'fa/maint-config-doc' into maint 2012-05-11 11:15:53 -07:00
git-count-objects.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-credential-cache--daemon.txt credentials: add "cache" helper 2011-12-11 23:16:25 -08:00
git-credential-cache.txt credentials: add "cache" helper 2011-12-11 23:16:25 -08:00
git-credential-store.txt credentials: add "store" helper 2011-12-12 16:09:38 -08:00
git-cvsexportcommit.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-cvsimport.txt
git-cvsserver.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-daemon.txt daemon: give friendlier error messages to clients 2011-10-15 21:15:06 -07:00
git-describe.txt
git-diff-files.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-diff-index.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-diff-tree.txt
git-diff.txt
git-difftool.txt difftool: print list of valid tools with '--tool-help' 2012-04-23 12:00:42 -07:00
git-fast-export.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-fast-import.txt Merge branch 'jk/doc-asciidoc-inline-literal' 2012-05-02 13:51:45 -07:00
git-fetch-pack.txt fetch-pack: new --stdin option to read refs from stdin 2012-04-02 13:47:15 -07:00
git-fetch.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-filter-branch.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-fmt-merge-msg.txt Document merge.branchdesc configuration variable 2012-02-23 11:20:15 -08:00
git-for-each-ref.txt for-each-ref: add split message parts to %(contents:*). 2011-09-08 13:56:19 -07:00
git-format-patch.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-fsck-objects.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-fsck.txt fsck doc: a minor typofix 2012-03-05 11:32:19 -08:00
git-gc.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-get-tar-commit-id.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-grep.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-gui.txt docs: put listed example commands in backticks 2011-08-04 15:49:13 -07:00
git-hash-object.txt
git-help.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-http-backend.txt ref namespaces: documentation 2011-07-11 09:35:46 -07:00
git-http-fetch.txt Mark http-fetch without -a as deprecated 2011-08-23 21:36:20 -07:00
git-http-push.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-imap-send.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-index-pack.txt
git-init-db.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-init.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-instaweb.txt Documentation: Link to gitweb(1) and gitweb.conf(5) in other manpages 2011-10-16 11:09:35 -07:00
git-log.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-lost-found.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-ls-files.txt
git-ls-remote.txt
git-ls-tree.txt
git-mailinfo.txt Merge branch 'tr/maint-mailinfo' 2012-01-12 23:34:26 -08:00
git-mailsplit.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-merge-base.txt
git-merge-file.txt docs: put listed example commands in backticks 2011-08-04 15:49:13 -07:00
git-merge-index.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-merge-one-file.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-merge-tree.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-merge.txt merge: use editor by default in interactive sessions 2012-01-23 14:34:55 -08:00
git-mergetool--lib.txt Merge branch 'jn/doc-dashdash' into maint 2011-09-11 21:52:18 -07:00
git-mergetool.txt Merge branch 'jm/mergetool-pathspec' into maint-1.7.6 2011-10-26 16:12:25 -07:00
git-mktag.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-mktree.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-mv.txt mv: honor --verbose flag 2011-12-12 11:52:31 -08:00
git-name-rev.txt
git-notes.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-p4.txt Sync with maint 2012-05-07 13:28:34 -07:00
git-pack-objects.txt
git-pack-redundant.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-pack-refs.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-parse-remote.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-patch-id.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-peek-remote.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-prune-packed.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-prune.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-pull.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-push.txt Merge branch 'jk/doc-asciidoc-inline-literal' 2012-05-02 13:51:45 -07:00
git-quiltimport.txt
git-read-tree.txt Merge branch 'jh/fetch-head-update' 2012-01-06 12:44:01 -08:00
git-rebase.txt Merge branch 'jk/doc-asciidoc-inline-literal' 2012-05-02 13:51:45 -07:00
git-receive-pack.txt Sync with 1.7.6.2 2011-09-06 11:42:12 -07:00
git-reflog.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-relink.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-remote-ext.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-remote-fd.txt docs: put listed example commands in backticks 2011-08-04 15:49:13 -07:00
git-remote-helpers.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-remote-testgit.txt (short) documentation for the testgit remote helper 2011-09-01 15:52:02 -07:00
git-remote.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-repack.txt fsck: --no-dangling omits "dangling object" information 2012-02-28 14:55:39 -08:00
git-replace.txt
git-repo-config.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-request-pull.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-rerere.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-reset.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-rev-list.txt
git-rev-parse.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-revert.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-rm.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-send-email.txt send-email: document the --smtp-debug option 2012-02-27 10:29:24 -08:00
git-send-pack.txt Revert "Merge branch 'cb/maint-quiet-push' into maint" 2011-09-06 11:10:41 -07:00
git-sh-i18n--envsubst.txt correct a few doubled-word nits in comments and documentation 2012-03-28 11:18:35 -07:00
git-sh-i18n.txt Merge branch 'jn/doc-dashdash' into maint 2011-09-11 21:52:18 -07:00
git-sh-setup.txt Merge branch 'tr/doc-sh-setup' into maint 2011-12-28 11:42:51 -08:00
git-shell.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-shortlog.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-show-branch.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-show-index.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-show-ref.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-show.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-stage.txt
git-stash.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-status.txt Merge branch 'jk/maint-status-porcelain-z-b' into HEAD 2012-05-08 04:55:35 -04:00
git-stripspace.txt Update documentation for stripspace 2011-12-12 16:48:54 -08:00
git-submodule.txt document submdule.$name.update=none option for gitmodules 2012-05-11 08:39:33 -07:00
git-svn.txt git svn dcommit: new option --interactive. 2011-10-16 08:12:26 +00:00
git-symbolic-ref.txt symbolic-ref --short: abbreviate the output unambiguously 2012-02-27 15:58:36 -08:00
git-tag.txt tag: add --column 2012-04-27 09:26:39 -07:00
git-tar-tree.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-tools.txt
git-unpack-file.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-unpack-objects.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-update-index.txt update-index: upgrade/downgrade on-disk index version 2012-04-04 09:57:50 -07:00
git-update-ref.txt Merge branch 'bw/log-all-ref-updates-doc' into maint 2011-08-16 11:41:28 -07:00
git-update-server-info.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-upload-archive.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-upload-pack.txt Merge branch 'js/ref-namespaces' 2011-08-17 17:35:38 -07:00
git-var.txt ident: report passwd errors with a more friendly message 2012-05-22 09:08:20 -07:00
git-verify-pack.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-verify-tag.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git-web--browse.txt Merge branch 'jn/doc-dashdash' into maint 2011-09-11 21:52:18 -07:00
git-whatchanged.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-write-tree.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
git.txt Git 1.7.10.2 2012-05-11 11:25:28 -07:00
gitattributes.txt Add a setting to require a filter to be successful 2012-02-17 07:37:08 -08:00
gitcli.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
gitcore-tutorial.txt Merge branch 'zj/diff-stat-smaller-num-columns' 2012-05-02 13:53:28 -07:00
gitcredentials.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
gitcvs-migration.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
gitdiffcore.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
gitglossary.txt
githooks.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
gitignore.txt
gitk.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
gitmodules.txt document submdule.$name.update=none option for gitmodules 2012-05-11 08:39:33 -07:00
gitnamespaces.txt Documentation/gitnamespaces.txt: cater to older asciidoc 2011-09-16 09:20:23 -07:00
gitrepository-layout.txt Documentation: Grammar correction, wording fixes and cleanup 2011-08-23 21:35:47 -07:00
gitrevisions.txt
gittutorial-2.txt Use correct grammar in diffstat summary line 2012-02-03 23:19:42 -08:00
gittutorial.txt Documentation: use [verse] for SYNOPSIS sections 2011-07-06 14:26:26 -07:00
gitweb.conf.txt Merge branch 'jk/doc-asciidoc-inline-literal' 2012-05-02 13:51:45 -07:00
gitweb.txt Documentation/gitweb: trivial English fixes 2012-03-23 11:22:04 -07:00
gitworkflows.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
glossary-content.txt Merge branch 'nk/ref-doc' into maint 2011-08-01 14:44:24 -07:00
howto-index.sh
i18n.txt
install-doc-quick.sh docs: Update install-doc-quick 2011-11-08 13:37:10 -08:00
install-webdoc.sh
mailmap.txt
Makefile Merge branch 'jk/doc-asciidoc-inline-literal' 2012-05-02 13:51:45 -07:00
manpage-1.72.xsl
manpage-base-url.xsl.in
manpage-base.xsl
manpage-bold-literal.xsl
manpage-normal.xsl
manpage-quote-apos.xsl
manpage-suppress-sp.xsl
merge-config.txt
merge-options.txt merge: backport GIT_MERGE_AUTOEDIT support 2012-03-20 15:39:10 -07:00
merge-strategies.txt
pretty-formats.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
pretty-options.txt
pull-fetch-param.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
rev-list-options.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
revisions.txt Documentation: do not assume that n > 1 in <rev>~$n 2012-03-02 09:33:29 -08:00
sequencer.txt revert: introduce --abort to cancel a failed cherry-pick 2011-11-22 18:16:59 -08:00
SubmittingPatches SubmittingPathces: remove Cogito reference 2011-09-11 20:53:00 -07:00
urls-remotes.txt
urls.txt
user-manual.conf
user-manual.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00