merge-recursive: fix rename handling

To handle renames properly, we iterate through all file names of both
heads, the current one, and the one to be merged.

Only that there was a bug, where it was checked if the file name was present
in both heads, but the result of the check was never used. Instead, the
merge proceeded as if both heads contained that file.

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