@matheusbsbs / matheus-bagliano / commits / 64491e1ea9
Fork 0

Documentation: git-commit in 1.2.X series defaults to --include.

The documentation was mistakenly describing the --only semantics to be default. The 1.2.0 release and its maintenance series 1.2.X will keep the traditional --include semantics as the default. Clarify the situation. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Feb 13, 2006 at 00:26 UTC 64491e1ea95acde1aa77db539ba498593a0fcbc5
1 file changed +27 -7
Documentation/git-commit.txt
+27 -7
@@ -8,8 +8,8 @@ git-commit - Record your changes
8 SYNOPSIS
9 --------
10 [verse]
11 -'git-commit' [-a] [-i] [-s] [-v] [(-c | -C) <commit> | -F <file> | -m <msg>]
12 - [-e] [--author <author>] [--] <file>...
11 +'git-commit' [-a] [-s] [-v] [(-c | -C) <commit> | -F <file> | -m <msg>]
12 + [-e] [--author <author>] [--] [[-i | -o ]<file>...]
13
14 DESCRIPTION
15 -----------
@@ -73,19 +73,39 @@ OPTIONS
73 commit the whole index. This is the traditional
74 behaviour.
75
76 ---::
77 - Do not interpret any more arguments as options.
78 -
79 -<file>...::
76 +-o|--only::
77 Commit only the files specified on the command line.
78 This format cannot be used during a merge, nor when the
79 index and the latest commit does not match on the
80 specified paths to avoid confusion.
81
82 +--::
83 + Do not interpret any more arguments as options.
84 +
85 +<file>...::
86 + Files to be committed. The meaning of these is
87 + different between `--include` and `--only`. Without
88 + either, it defaults `--include` semantics.
89 +
90 If you make a commit and then found a mistake immediately after
91 that, you can recover from it with gitlink:git-reset[1].
92
93
94 +WARNING
95 +-------
96 +
97 +The 1.2.0 and its maintenance series 1.2.X will keep the
98 +traditional `--include` semantics as the default when neither
99 +`--only` nor `--include` is specified and `paths...` are given.
100 +This *will* change during the development towards 1.3.0 in the
101 +'master' branch of `git.git` repository. If you are using this
102 +command in your scripts, and you depend on the traditional
103 +`--include` semantics, please update them to explicitly ask for
104 +`--include` semantics. Also if you are used to making partial
105 +commit using `--include` semantics, please train your fingers to
106 +say `git commit --include paths...` (or `git commit -i paths...`).
107 +
108 +
109 Discussion
110 ----------
111
@@ -101,7 +121,7 @@ even the command is invoked from a subdirectory.
121 That is, update the specified paths to the index and then commit
122 the whole tree.
123
104 -`git commit paths...` largely bypasses the index file and
124 +`git commit --only paths...` largely bypasses the index file and
125 commits only the changes made to the specified paths. It has
126 however several safety valves to prevent confusion.
127