From: Johannes Sixt <johannes.sixt@telecom.at>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Johannes Sixt <johannes.sixt@telecom.at>
Subject: [PATCH] Document option --only of git commit
Date: Thu, 10 Apr 2008 13:33:09 +0200 [thread overview]
Message-ID: <1207827189-7509-2-git-send-email-johannes.sixt@telecom.at> (raw)
In-Reply-To: <1207827189-7509-1-git-send-email-johannes.sixt@telecom.at>
Its documentation was removed by 6c96753df9db7f790a2ac4d95ec2a868394cd5ff,
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>
---
Documentation/git-commit.txt | 11 +++++++++++
builtin-commit.c | 2 +-
2 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index b4ae61f..4bb51cc 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -139,6 +139,17 @@ but can be used to amend a merge commit.
as well. This is usually not what you want unless you
are concluding a conflicted merge.
+-o|--only::
+ Make a commit only from the paths specified on the
+ command line, disregarding any contents that have been
+ staged so far. This is the default mode of operation of
+ 'git commit' if any paths are given on the command line,
+ in which case this option can be omitted.
+ If this option is specified together with '--amend', then
+ no paths need be specified, which can be used to amend
+ the last commit without committing changes that have
+ already been staged.
+
-u|--untracked-files::
Show all untracked files, also those in uninteresting
directories, in the "Untracked files:" section of commit
diff --git a/builtin-commit.c b/builtin-commit.c
index e3adfdf..bcb7aaa 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -98,7 +98,7 @@ static struct option builtin_commit_options[] = {
OPT_BOOLEAN('a', "all", &all, "commit all changed files"),
OPT_BOOLEAN('i', "include", &also, "add specified files to index for commit"),
OPT_BOOLEAN(0, "interactive", &interactive, "interactively add files"),
- OPT_BOOLEAN('o', "only", &only, ""),
+ OPT_BOOLEAN('o', "only", &only, "commit only specified files"),
OPT_BOOLEAN('n', "no-verify", &no_verify, "bypass pre-commit hook"),
OPT_BOOLEAN(0, "amend", &amend, "amend previous commit"),
OPT_BOOLEAN(0, "untracked-files", &untracked_files, "show all untracked files"),
--
1.5.5.33.g376d1
next prev parent reply other threads:[~2008-04-10 11:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-10 11:33 [PATCH] builtin-commit.c: Remove a redundant assignment Johannes Sixt
2008-04-10 11:33 ` Johannes Sixt [this message]
2008-04-18 9:28 ` [PATCH] Document option --only of git commit Pieter de Bie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1207827189-7509-2-git-send-email-johannes.sixt@telecom.at \
--to=johannes.sixt@telecom.at \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).