@matheusbsbs / matheus-bagliano / commits / d4ba07cac5
Fork 0

Document option --only of git commit

Its documentation was removed by 6c96753 (Documentation/git-commit: rewrite to make it more end-user friendly, 2006-12-08), even though it is referenced from a few places, including builtin-commit.c (as part of the commentary in the commit message template). Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Sixt committed Apr 10, 2008 at 13:33 UTC d4ba07cac576e87fd194df0853ed523af6c58af1
2 files changed +12 -1
Documentation/git-commit.txt
+11
@@ -139,6 +139,17 @@ but can be used to amend a merge commit.
139 as well. This is usually not what you want unless you
140 are concluding a conflicted merge.
141
142 +-o|--only::
143 + Make a commit only from the paths specified on the
144 + command line, disregarding any contents that have been
145 + staged so far. This is the default mode of operation of
146 + 'git commit' if any paths are given on the command line,
147 + in which case this option can be omitted.
148 + If this option is specified together with '--amend', then
149 + no paths need be specified, which can be used to amend
150 + the last commit without committing changes that have
151 + already been staged.
152 +
153 -u|--untracked-files::
154 Show all untracked files, also those in uninteresting
155 directories, in the "Untracked files:" section of commit
builtin-commit.c
+1 -1
@@ -97,7 +97,7 @@ static struct option builtin_commit_options[] = {
97 OPT_BOOLEAN('a', "all", &all, "commit all changed files"),
98 OPT_BOOLEAN('i', "include", &also, "add specified files to index for commit"),
99 OPT_BOOLEAN(0, "interactive", &interactive, "interactively add files"),
100 - OPT_BOOLEAN('o', "only", &only, ""),
100 + OPT_BOOLEAN('o', "only", &only, "commit only specified files"),
101 OPT_BOOLEAN('n', "no-verify", &no_verify, "bypass pre-commit hook"),
102 OPT_BOOLEAN(0, "amend", &amend, "amend previous commit"),
103 OPT_BOOLEAN(0, "untracked-files", &untracked_files, "show all untracked files"),