Re: [PATCH] Document option --only of git commit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 10 apr 2008, at 13:33, Johannes Sixt wrote:
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@xxxxxxxxxx>

+-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.
+

I find this addition to the manpage very confusing. If -o commits paths only from the command line, and it is also the default operation when run with paths, why is this text at the -o option? This behaviour is already documented in the description of git-commit:

3. by listing files as arguments to the commit command, in which case the commit will ignore changes staged in the index, and instead record the current content of the
          listed files;

I'd suggest only using the second part (about --amend), or optionally adding something about what happens if you specify -o without --amend and without paths.

- Pieter

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux