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

Re: [PATCH] doc: add note about ignoring --no-create-reflog

From
CWCornelius Weig <cornelius.weig@tngtech.com>
Date
Feb 1, 2017, 23:19 UTC
Message-ID
<dd0a1d56-aa39-a2a4-0ea2-cb64f79dd640@tngtech.com>
In-Reply-To
<xmqqmve5mrpe.fsf@gitster.mtv.corp.google.com>
On 02/02/2017 12:11 AM, Junio C Hamano wrote:
Show 6 quoted lines
> Jeff King <peff@peff.net> writes:
> 
>> This might be nitpicking, but it's _not_ ignored. It still negates an
>> earlier "--create-reflog". It is only that it does not override the
>> decision to create a reflog caused by the setting of
>> core.logallrefupdates.
This corner case is quite important. Glad you thought about it!
Show 51 quoted lines
> -- >8 --
> From: Cornelius Weig <cornelius.weig@tngtech.com>
> Date: Wed, 1 Feb 2017 23:07:27 +0100
> Subject: [PATCH] doc: add note about ignoring '--no-create-reflog'
> 
> The commands git-branch and git-tag accept the '--create-reflog'
> option, and create reflog even when core.logallrefupdates
> configuration is explicitly set not to.
> 
> On the other hand, the negated form '--no-create-reflog' is accepted
> as a valid option but has no effect (other than overriding an
> earlier '--create-reflog' on the command line). This silent noop may
> puzzle users.  To communicate that this is a known limitation, add a
> short note in the manuals for git-branch and git-tag.
> 
> Signed-off-by: Cornelius Weig <cornelius.weig@tngtech.com>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
>  Documentation/git-branch.txt | 3 +++
>  Documentation/git-tag.txt    | 3 +++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
> index 5516a47b54..102e426fd8 100644
> --- a/Documentation/git-branch.txt
> +++ b/Documentation/git-branch.txt
> @@ -91,6 +91,9 @@ OPTIONS
>  	based sha1 expressions such as "<branchname>@\{yesterday}".
>  	Note that in non-bare repositories, reflogs are usually
>  	enabled by default by the `core.logallrefupdates` config option.
> +	The negated form `--no-create-reflog` does not override the
> +	default, even though it overrides `--create-reflog` that appears
> +	earlier on the command line.
>  
>  -f::
>  --force::
> diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt
> index 2ac25a9bb3..fd7eeae075 100644
> --- a/Documentation/git-tag.txt
> +++ b/Documentation/git-tag.txt
> @@ -152,6 +152,9 @@ This option is only applicable when listing tags without annotation lines.
>  --create-reflog::
>  	Create a reflog for the tag. To globally enable reflogs for tags, see
>  	`core.logAllRefUpdates` in linkgit:git-config[1].
> +	The negated form `--no-create-reflog` does not override the
> +	default, even though it overrides `--create-reflog` that appears
> +	earlier on the command line.
>  
>  <tagname>::
>  	The name of the tag to create, delete, or describe.
> 

Your amended version is quite concise and says everything there is to say. Thanks

Previous: Junio C HamanoNext: Jeff King
Message 5 of 10 in “doc: add note about ignoring --no-create-reflog”
  1. doc: add note about ignoring --no-create-reflogcornelius.weig@tngtech.com, Feb 1, 2017
  2. Junio C HamanoFeb 1, 2017
  3. Jeff KingFeb 1, 2017
  4. Junio C HamanoFeb 1, 2017
  5. Cornelius WeigFeb 1, 2017
  6. Jeff KingFeb 1, 2017
  7. Cornelius WeigFeb 1, 2017
  8. Junio C HamanoFeb 1, 2017
  9. Jeff KingFeb 1, 2017
  10. Junio C HamanoFeb 1, 2017

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.