abbrev cleanup: use symbolic constants

The minimum length of abbreviated object name was hardcoded in
different places to be 4, risking inconsistencies in the future.
Also there were three different "default abbreviation
precision".  Use two C preprocessor symbols to clean up this
mess.

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