git-commit: revamp the git-commit semantics.

 - "git commit" without _any_ parameter keeps the traditional
   behaviour.  It commits the current index.

   We commit the whole index even when this form is run from a
   subdirectory.

 - "git commit --include paths..." (or "git commit -i paths...")
   is equivalent to:

   	git update-index --remove paths...
        git commit

 - "git commit paths..." acquires a new semantics.  This is an
   incompatible change that needs user training, which I am
   still a bit reluctant to swallow, but enough people seem to
   have complained that it is confusing to them.  It

   1. refuses to run if $GIT_DIR/MERGE_HEAD exists, and reminds
      trained git users that the traditional semantics now needs
      -i flag.

   2. refuses to run if named paths... are different in HEAD and
      the index (ditto about reminding).  Added paths are OK.

   3. reads HEAD commit into a temporary index file.

   4. updates named paths... from the working tree in this
      temporary index.

   5. does the same updates of the paths... from the working
      tree to the real index.

   6. makes a commit using the temporary index that has the
      current HEAD as the parent, and updates the HEAD with this
      new commit.

 - "git commit --all" can run from a subdirectory, but it updates
   the index with all the modified files and does a whole tree
   commit.

 - In all cases, when the command decides not to create a new
   commit, the index is left as it was before the command is
   run.  This means that the two "git diff" in the following
   sequence:

       $ git diff
       $ git commit -a
       $ git diff

   would show the same diff if you abort the commit process by
   making the commit log message empty.

This commit also introduces much requested --author option.

	$ git commit --author 'A U Thor <author@example.com>'

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