Use sensible domain name (the DNS one) when guessing ident information

Currently, the code would use getdomainname() call, which however returns
something usually unset and not necessarily related at all to the DNS
domain name (it seems to be mostly some scary NIS/YP thing).

This patch changes the code to actually use the DNS domain name, which is
also what tends to be used in emails, and we aim at emails with our ident
code.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
1 file changed
tree: d0c32a64faaf7843d6624882f775e7f66416b5c7
  1. arm/
  2. compat/
  3. debian/
  4. Documentation/
  5. mozilla-sha1/
  6. ppc/
  7. t/
  8. templates/
  9. .gitignore
  10. apply.c
  11. blob.c
  12. blob.h
  13. cache.h
  14. cat-file.c
  15. check-ref-format.c
  16. checkout-index.c
  17. clone-pack.c
  18. cmd-rename.sh
  19. commit-tree.c
  20. commit.c
  21. commit.h
  22. config.c
  23. connect.c
  24. convert-objects.c
  25. COPYING
  26. count-delta.c
  27. count-delta.h
  28. csum-file.c
  29. csum-file.h
  30. ctype.c
  31. daemon.c
  32. date.c
  33. delta.h
  34. diff-delta.c
  35. diff-files.c
  36. diff-index.c
  37. diff-stages.c
  38. diff-tree.c
  39. diff.c
  40. diff.h
  41. diffcore-break.c
  42. diffcore-order.c
  43. diffcore-pathspec.c
  44. diffcore-pickaxe.c
  45. diffcore-rename.c
  46. diffcore.h
  47. entry.c
  48. environment.c
  49. epoch.c
  50. epoch.h
  51. fetch-pack.c
  52. fetch.c
  53. fetch.h
  54. fsck-objects.c
  55. get-tar-commit-id.c
  56. git-add.sh
  57. git-am.sh
  58. git-applymbox.sh
  59. git-applypatch.sh
  60. git-archimport.perl
  61. git-bisect.sh
  62. git-branch.sh
  63. git-checkout.sh
  64. git-cherry.sh
  65. git-clone.sh
  66. git-commit.sh
  67. git-core.spec.in
  68. git-count-objects.sh
  69. git-cvsimport.perl
  70. git-diff.sh
  71. git-fetch.sh
  72. git-findtags.perl
  73. git-fmt-merge-msg.perl
  74. git-format-patch.sh
  75. git-grep.sh
  76. git-log.sh
  77. git-ls-remote.sh
  78. git-merge-octopus.sh
  79. git-merge-one-file.sh
  80. git-merge-recursive.py
  81. git-merge-resolve.sh
  82. git-merge-stupid.sh
  83. git-merge.sh
  84. git-octopus.sh
  85. git-parse-remote.sh
  86. git-prune.sh
  87. git-pull.sh
  88. git-push.sh
  89. git-rebase.sh
  90. git-relink.perl
  91. git-rename.perl
  92. git-repack.sh
  93. git-request-pull.sh
  94. git-reset.sh
  95. git-resolve.sh
  96. git-revert.sh
  97. git-send-email.perl
  98. git-sh-setup.sh
  99. git-shortlog.perl
  100. git-status.sh
  101. git-svnimport.perl
  102. git-tag.sh
  103. git-verify-tag.sh
  104. git-whatchanged.sh
  105. git.sh
  106. gitk
  107. gitMergeCommon.py
  108. hash-object.c
  109. http-fetch.c
  110. ident.c
  111. index-pack.c
  112. index.c
  113. init-db.c
  114. INSTALL
  115. local-fetch.c
  116. ls-files.c
  117. ls-tree.c
  118. mailinfo.c
  119. mailsplit.c
  120. Makefile
  121. merge-base.c
  122. merge-index.c
  123. mktag.c
  124. object.c
  125. object.h
  126. pack-check.c
  127. pack-objects.c
  128. pack.h
  129. patch-delta.c
  130. patch-id.c
  131. path.c
  132. peek-remote.c
  133. pkt-line.c
  134. pkt-line.h
  135. prune-packed.c
  136. quote.c
  137. quote.h
  138. read-cache.c
  139. read-tree.c
  140. README
  141. receive-pack.c
  142. refs.c
  143. refs.h
  144. rev-list.c
  145. rev-parse.c
  146. rsh.c
  147. rsh.h
  148. run-command.c
  149. run-command.h
  150. send-pack.c
  151. server-info.c
  152. setup.c
  153. sha1_file.c
  154. sha1_name.c
  155. show-branch.c
  156. show-index.c
  157. ssh-fetch.c
  158. ssh-pull.c
  159. ssh-push.c
  160. ssh-upload.c
  161. strbuf.c
  162. strbuf.h
  163. stripspace.c
  164. symbolic-ref.c
  165. tag.c
  166. tag.h
  167. tar-tree.c
  168. test-date.c
  169. test-delta.c
  170. tree.c
  171. tree.h
  172. unpack-file.c
  173. unpack-objects.c
  174. update-index.c
  175. update-ref.c
  176. update-server-info.c
  177. upload-pack.c
  178. usage.c
  179. var.c
  180. verify-pack.c
  181. write-tree.c