Make index file locking code reusable to others.

The framework to create lockfiles that are removed at exit is
first used to reliably write the index file, but it is
applicable to other things, so stop calling it "cache_file".

This also rewords a few remaining error message that called the
index file "cache file".

Signed-off-by: Junio C Hamano <junkio@cox.net>
11 files changed
tree: 125f7ae01b9c959782e345baa03c7c786cc3f4ce
  1. arm/
  2. compat/
  3. contrib/
  4. Documentation/
  5. mozilla-sha1/
  6. ppc/
  7. t/
  8. templates/
  9. xdiff/
  10. .gitignore
  11. base85.c
  12. blame.c
  13. blob.c
  14. blob.h
  15. builtin-add.c
  16. builtin-apply.c
  17. builtin-cat-file.c
  18. builtin-check-ref-format.c
  19. builtin-commit-tree.c
  20. builtin-count.c
  21. builtin-diff-files.c
  22. builtin-diff-index.c
  23. builtin-diff-stages.c
  24. builtin-diff-tree.c
  25. builtin-diff.c
  26. builtin-grep.c
  27. builtin-help.c
  28. builtin-init-db.c
  29. builtin-log.c
  30. builtin-ls-files.c
  31. builtin-ls-tree.c
  32. builtin-push.c
  33. builtin-read-tree.c
  34. builtin-rev-list.c
  35. builtin-rev-parse.c
  36. builtin-rm.c
  37. builtin-show-branch.c
  38. builtin-tar-tree.c
  39. builtin-upload-tar.c
  40. builtin.h
  41. cache-tree.c
  42. cache-tree.h
  43. cache.h
  44. checkout-index.c
  45. clone-pack.c
  46. combine-diff.c
  47. commit.c
  48. commit.h
  49. config.c
  50. connect.c
  51. convert-objects.c
  52. copy.c
  53. COPYING
  54. csum-file.c
  55. csum-file.h
  56. ctype.c
  57. daemon.c
  58. date.c
  59. delta.h
  60. describe.c
  61. diff-delta.c
  62. diff-lib.c
  63. diff.c
  64. diff.h
  65. diffcore-break.c
  66. diffcore-delta.c
  67. diffcore-order.c
  68. diffcore-pickaxe.c
  69. diffcore-rename.c
  70. diffcore.h
  71. dir.c
  72. dir.h
  73. dump-cache-tree.c
  74. entry.c
  75. environment.c
  76. exec_cmd.c
  77. exec_cmd.h
  78. fetch-clone.c
  79. fetch-pack.c
  80. fetch.c
  81. fetch.h
  82. fsck-objects.c
  83. generate-cmdlist.sh
  84. get-tar-commit-id.c
  85. git-am.sh
  86. git-annotate.perl
  87. git-applymbox.sh
  88. git-applypatch.sh
  89. git-archimport.perl
  90. git-bisect.sh
  91. git-branch.sh
  92. git-checkout.sh
  93. git-cherry.sh
  94. git-clean.sh
  95. git-clone.sh
  96. git-commit.sh
  97. git-compat-util.h
  98. git-cvsexportcommit.perl
  99. git-cvsimport.perl
  100. git-cvsserver.perl
  101. git-fetch.sh
  102. git-fmt-merge-msg.perl
  103. git-lost-found.sh
  104. git-ls-remote.sh
  105. git-merge-octopus.sh
  106. git-merge-one-file.sh
  107. git-merge-ours.sh
  108. git-merge-recursive.py
  109. git-merge-resolve.sh
  110. git-merge-stupid.sh
  111. git-merge.sh
  112. git-mv.perl
  113. git-p4import.py
  114. git-parse-remote.sh
  115. git-prune.sh
  116. git-pull.sh
  117. git-push.sh
  118. git-quiltimport.sh
  119. git-rebase.sh
  120. git-relink.perl
  121. git-repack.sh
  122. git-request-pull.sh
  123. git-rerere.perl
  124. git-reset.sh
  125. git-resolve.sh
  126. git-revert.sh
  127. git-send-email.perl
  128. git-sh-setup.sh
  129. git-shortlog.perl
  130. git-svnimport.perl
  131. git-tag.sh
  132. git-verify-tag.sh
  133. GIT-VERSION-GEN
  134. git.c
  135. git.spec.in
  136. gitk
  137. gitMergeCommon.py
  138. hash-object.c
  139. http-fetch.c
  140. http-push.c
  141. http.c
  142. http.h
  143. ident.c
  144. imap-send.c
  145. index-pack.c
  146. INSTALL
  147. local-fetch.c
  148. lockfile.c
  149. log-tree.c
  150. log-tree.h
  151. mailinfo.c
  152. mailsplit.c
  153. Makefile
  154. merge-base.c
  155. merge-index.c
  156. merge-tree.c
  157. mktag.c
  158. mktree.c
  159. name-rev.c
  160. object.c
  161. object.h
  162. pack-check.c
  163. pack-objects.c
  164. pack-redundant.c
  165. pack.h
  166. pager.c
  167. patch-delta.c
  168. patch-id.c
  169. path.c
  170. peek-remote.c
  171. pkt-line.c
  172. pkt-line.h
  173. prune-packed.c
  174. quote.c
  175. quote.h
  176. read-cache.c
  177. README
  178. receive-pack.c
  179. refs.c
  180. refs.h
  181. repo-config.c
  182. revision.c
  183. revision.h
  184. rsh.c
  185. rsh.h
  186. run-command.c
  187. run-command.h
  188. send-pack.c
  189. server-info.c
  190. setup.c
  191. sha1_file.c
  192. sha1_name.c
  193. shell.c
  194. show-index.c
  195. ssh-fetch.c
  196. ssh-pull.c
  197. ssh-push.c
  198. ssh-upload.c
  199. strbuf.c
  200. strbuf.h
  201. stripspace.c
  202. symbolic-ref.c
  203. tag.c
  204. tag.h
  205. tar.h
  206. test-date.c
  207. test-delta.c
  208. tree-diff.c
  209. tree-walk.c
  210. tree-walk.h
  211. tree.c
  212. tree.h
  213. unpack-file.c
  214. unpack-objects.c
  215. update-index.c
  216. update-ref.c
  217. update-server-info.c
  218. upload-pack.c
  219. usage.c
  220. var.c
  221. verify-pack.c
  222. write-tree.c
  223. xdiff-interface.c
  224. xdiff-interface.h