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

Re: [[PATCH v2]] commit: add a commit.allowempty config variable

From
Duy Nguyen <pclouds@gmail.com>
Date
Nov 3, 2018, 14:43 UTC
Message-ID
<CACsJy8DttJ2EBcN8Kq-yECY0Pvp3vd0Vx45=szWD0cBW0Mcixw@mail.gmail.com>
In-Reply-To
<20181103115300.6518-1-tanushreetumane@gmail.com>
On Sat, Nov 3, 2018 at 12:55 PM tanushree27 <tanushreetumane@gmail.com> wrote:
Show 25 quoted lines
>
> Add commit.allowempty configuration variable as a convenience for those
> who always prefer --allow-empty.
>
> Add tests to check the behavior introduced by this commit.
>
> This closes https://github.com/git-for-windows/git/issues/1854
>
> Signed-off-by: tanushree27 <tanushreetumane@gmail.com>
> ---
>  Documentation/config.txt     |  5 +++++
>  Documentation/git-commit.txt |  3 ++-
>  builtin/commit.c             |  8 ++++++++
>  t/t7500-commit.sh            | 32 ++++++++++++++++++++++++++++++++
>  4 files changed, 47 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index c0727b7866..ac63b12ab3 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -1467,6 +1467,11 @@ commit.verbose::
>         A boolean or int to specify the level of verbose with `git commit`.
>         See linkgit:git-commit[1].
>
> +commit.allowempty::
The current naming convention is camelCase. So this should be commit.allowEmpty.
Show 18 quoted lines
> +       A boolean to specify whether empty commits are allowed with `git
> +       commit`. See linkgit:git-commit[1].
> +       Defaults to false.
> +
>  credential.helper::
>         Specify an external helper to be called when a username or
>         password credential is needed; the helper may consult external
> diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
> index f970a43422..07a5b60ab9 100644
> --- a/Documentation/git-commit.txt
> +++ b/Documentation/git-commit.txt
> @@ -176,7 +176,8 @@ The `-m` option is mutually exclusive with `-c`, `-C`, and `-F`.
>         Usually recording a commit that has the exact same tree as its
>         sole parent commit is a mistake, and the command prevents you
>         from making such a commit.  This option bypasses the safety, and
> -       is primarily for use by foreign SCM interface scripts.
> +       is primarily for use by foreign SCM interface scripts. See
> +       `commit.allowempty` in linkgit:git-config[1].
Same.
>
>  --allow-empty-message::
>         Like --allow-empty this command is primarily for use by foreign
-- 
Duy
Previous: tanushree27Next: tanushree27
Message 3 of 14 in “commit: add a commit.allowEmpty config variable”
  1. commit: add a commit.allowEmpty config variabletanushree27, Nov 3, 2018
  2. ] commit: add a commit.allowempty config variabletanushree27, Nov 3, 2018
  3. Duy NguyenNov 3, 2018
  4. commit: add a commit.allowEmpty config variabletanushree27, Nov 3, 2018
  5. Ævar Arnfjörð BjarmasonNov 3, 2018
  6. Junio C HamanoNov 5, 2018
  7. commit: add a commit.allowEmpty config variableTanushree Tumane, Nov 13, 2018
  8. Johannes SchindelinNov 13, 2018
  9. Ævar Arnfjörð BjarmasonNov 13, 2018
  10. Junio C HamanoNov 14, 2018
  11. Johannes SchindelinNov 14, 2018
  12. Johannes SchindelinNov 15, 2018
  13. Jeff KingNov 15, 2018
  14. Johannes SchindelinNov 15, 2018

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.