OSDN Git Service

doc: add note about ignoring '--no-create-reflog'
authorCornelius Weig <cornelius.weig@tngtech.com>
Wed, 1 Feb 2017 22:07:27 +0000 (23:07 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 1 Feb 2017 23:53:40 +0000 (15:53 -0800)
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>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-branch.txt
Documentation/git-tag.txt

index 5516a47..28d46cc 100644 (file)
@@ -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` only overrides an earlier
+       `--create-reflog`, but currently does not negate the setting of
+       `core.logallrefupdates`.
 
 -f::
 --force::
index 2ac25a9..1d2e9a0 100644 (file)
@@ -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` only overrides an earlier
+       `--create-reflog`, but currently does not negate the setting of
+       `core.logallrefupdates`.
 
 <tagname>::
        The name of the tag to create, delete, or describe.