git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-commit doc: say -t requires editing commit message

From
Ivan Heffner <iheffner@gmail.com>
Date
Mar 29, 2012, 18:09 UTC
Message-ID
<CAF_oF=xGHdbkYw-ytvcZvJnqZ_jdckUCBiuUDzkqGDk=66+yMQ@mail.gmail.com>
In-Reply-To
<1333043876-19966-1-git-send-email-haircut@gmail.com>
I'd suggest being much more verbose about what's going on and why.
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index 5cc84a1..e842916 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -133,10 +133,12 @@ OPTIONS
 -t <file>::
 --template=<file>::
        Use the contents of the given file as the initial version
-       of the commit message. The editor is invoked and you can
-       make subsequent changes. If a message is specified using
-       the `-m` or `-F` options, this option has no effect. This
-       overrides the `commit.template` configuration variable.
+       of the commit message. The editor is invoked so you can
+       make changes. If a message is specified using the `-m` or `-F`
+       options, this option has no effect. This overrides the
+       `commit.template` configuration variable. If the message is
+       unchanged, the message is considered to be empty and the commit is
+       aborted

 -s::
 --signoff::
--
1.7.6.553.g917d7.dirty

On Thu, Mar 29, 2012 at 10:57 AM, Adam Monsen <haircut@gmail.com> wrote:
>
> Make it clear that, when using a commit template, the message *must* be
> changed or the commit will be aborted "due to empty commit message".
>
> Signed-off-by: Adam Monsen <haircut@gmail.com>
> ---
>
> I found it confusing that the commit template itself, even if
> non-empty, must be edited. Hopefully this clears that up a bit.
>
>  Documentation/git-commit.txt |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
> index 5cc84a1..44947ab 100644
> --- a/Documentation/git-commit.txt
> +++ b/Documentation/git-commit.txt
> @@ -133,7 +133,7 @@ OPTIONS
>  -t <file>::
>  --template=<file>::
>        Use the contents of the given file as the initial version
> -       of the commit message. The editor is invoked and you can
> +       of the commit message. The editor is invoked and you must
>        make subsequent changes. If a message is specified using
>        the `-m` or `-F` options, this option has no effect. This
>        overrides the `commit.template` configuration variable.
> --
> 1.7.5.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: Adam MonsenNext: Adam Monsen
Message 2 of 19 in “git-commit doc: say -t requires editing commit message”
  1. git-commit doc: say -t requires editing commit messageAdam Monsen, Mar 29, 2012
  2. Ivan HeffnerMar 29, 2012
  3. git-commit.txt: clarify -t requires editing messageAdam Monsen, Mar 29, 2012
  4. Junio C HamanoMar 30, 2012
  5. Adam MonsenMar 30, 2012
  6. Junio C HamanoMar 30, 2012
  7. Adam MonsenMar 30, 2012
  8. Junio C HamanoMar 30, 2012
  9. Adam MonsenMar 30, 2012
  10. Junio C HamanoMar 30, 2012
  11. 0/3 "commit --template" fixesJunio C Hamano, Mar 30, 2012
  12. 1/3 t7501: test the right kind of breakageJunio C Hamano, Mar 30, 2012
  13. 2/3 commit: do not trigger bogus "has templated message edited" checkJunio C Hamano, Mar 30, 2012
  14. 3/3 commit: rephrase the error when user did not touch templated log messageJunio C Hamano, Mar 30, 2012
  15. Adam MonsenMar 31, 2012
  16. Junio C HamanoApr 1, 2012
  17. Adam MonsenApr 3, 2012
  18. Junio C HamanoApr 3, 2012
  19. Adam MonsenApr 5, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.