git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Pieter de Bie <pdebie@ai.rug.nl>
To: Johannes Sixt <johannes.sixt@telecom.at>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] Document option --only of git commit
Date: Fri, 18 Apr 2008 11:28:54 +0200	[thread overview]
Message-ID: <9CE1A95F-941C-474F-9F18-1B01B73113B2@ai.rug.nl> (raw)
In-Reply-To: <1207827189-7509-2-git-send-email-johannes.sixt@telecom.at>

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@telecom.at>

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

      reply	other threads:[~2008-04-18  9:30 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 ` [PATCH] Document option --only of git commit Johannes Sixt
2008-04-18  9:28   ` Pieter de Bie [this message]

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=9CE1A95F-941C-474F-9F18-1B01B73113B2@ai.rug.nl \
    --to=pdebie@ai.rug.nl \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.sixt@telecom.at \
    /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).