revision parsing: make "rev -- paths" checks stronger.

If you don't have a "--" marker, then:

 - all of the arguments we are going to assume are pathspecs
   must exist in the working tree.

 - none of the arguments we parsed as revisions could be
   interpreted as a filename.

so that there really isn't any possibility of confusion in case
somebody does have a revision that looks like a pathname too.

The former rule has been in effect; this implements the latter.

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