Document pack .idx file format upgrade strategy.

Way back when Junio developed the 64 bit index topic he came up
with a means of changing the .idx file format so that older Git
clients would recognize that they don't understand the file and
refuse to read it, while newer clients could tell the difference
between the old-style and new-style .idx files.  Unfortunately
this wasn't recorded anywhere.

This change documents how we might go about changing the .idx
file format by using a special signature in the first four bytes.
Credit (and possible blame) goes completely to Junio for thinking
up this technique.

The change also modifies the error message of the current Git code
so that users get a recommendation to upgrade their Git software
should this version or later encounter a new-style .idx which it
cannot process.  We already do this for the .pack files, but since
we usually process the .idx files first its important that these
files are recognized and encourage an upgrade.

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