diff: make "too many files" rename warning optional

In many cases, the warning ends up as clutter, because the
diff is being done "behind the scenes" from the user (e.g.,
when generating a commit diffstat), and whether we show
renames or not is not particularly interesting to the user.

However, in the case of a merge (which is what motivated the
warning in the first place), it is a useful hint as to why a
merge with renames might have failed.

This patch makes the warning optional based on the code
calling into diffcore. We default to not showing the
warning, but turn it on for merges.

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