Re: [PATCH] Document 'git commit --no-edit' explicitly

2012-11-02 Thread Jeff King
On Fri, Nov 02, 2012 at 11:39:30AM +0100, Matthieu Moy wrote:

> I was tempted to merge the paragraph with --edit::, but I thought this
> may add confusion. The use-cases for --edit and --no-edit are really
> different so I went for a separate paragraph, right below the --edit one.

Yeah, usually I think it would be better to keep the positive and
negative forms together, but the way you have done it does seem a lot
more clear to me. I think it is because the default flips based on other
options. So you would be stuck writing something like:

  -e, --edit::
  Edit the commit message using `$EDITOR`. This is the default
  unless the `-F`, `-m`, or `-C` options are used; in those
  cases, `-e` or `--edit` can be used to invoke the editor.
  Likewise, `--no-edit` can be used to suppress the editor when
  using an existing commit message. For example, `git commit
  --amend --no-edit` amends a commit without changing its commit
  message.

Your split reads much better, IMHO.

Thanks.

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


Re: [PATCH] Document 'git commit --no-edit' explicitly

2012-11-02 Thread Matthieu Moy
ni...@lysator.liu.se (Niels Möller) writes:

> Matthieu Moy  writes:
>
>> +--no-edit::
>> +Use the selected commit message without launching an editor.
>> +For example, `git commit --amend --no-edit` amends a commit
>> +without changing its commit message.
>
> Looks clear enough to me. Thanks for fixing.
>
> Are -c --no-edit and -C really equivalent in all cases?

I guess so, but I didn't check.

> If so, maybe you want to say that in the documentation for -C.

I don't think we should target exhaustivity in the documentation, so I'm
not in favor of *adding* it. But maybe we should replace the doc with
stg like:

-c ::
--reedit-message=::
Like '-C --edit'.

(it could even make sense to deprecate one of -C/-c)

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Document 'git commit --no-edit' explicitly

2012-11-02 Thread Niels Möller
Matthieu Moy  writes:

> +--no-edit::
> + Use the selected commit message without launching an editor.
> + For example, `git commit --amend --no-edit` amends a commit
> + without changing its commit message.

Looks clear enough to me. Thanks for fixing.

Are -c --no-edit and -C really equivalent in all cases? If so, maybe you
want to say that in the documentation for -C. (And if not, maybe they
*ought* to be equivalent).

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] Document 'git commit --no-edit' explicitly

2012-11-02 Thread Matthieu Moy

Signed-off-by: Matthieu Moy 
---
I was tempted to merge the paragraph with --edit::, but I thought this
may add confusion. The use-cases for --edit and --no-edit are really
different so I went for a separate paragraph, right below the --edit one.

 Documentation/git-commit.txt | 5 +
 1 file changed, 5 insertions(+)

diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index 3acf2e7..44b4347 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -188,6 +188,11 @@ OPTIONS
commit log message unmodified.  This option lets you
further edit the message taken from these sources.
 
+--no-edit::
+   Use the selected commit message without launching an editor.
+   For example, `git commit --amend --no-edit` amends a commit
+   without changing its commit message.
+
 --amend::
Used to amend the tip of the current branch. Prepare the tree
object you would want to replace the latest commit as usual
-- 
1.8.0.319.g8abfee4

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