Skip to content

Commit 67c70bd

Browse files
Cornelius Weiggitster
authored andcommitted
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 <[email protected]> Helped-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b1421a4 commit 67c70bd

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Documentation/git-branch.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ OPTIONS
9191
based sha1 expressions such as "<branchname>@\{yesterday}".
9292
Note that in non-bare repositories, reflogs are usually
9393
enabled by default by the `core.logallrefupdates` config option.
94+
The negated form `--no-create-reflog` only overrides an earlier
95+
`--create-reflog`, but currently does not negate the setting of
96+
`core.logallrefupdates`.
9497

9598
-f::
9699
--force::

Documentation/git-tag.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ This option is only applicable when listing tags without annotation lines.
152152
--create-reflog::
153153
Create a reflog for the tag. To globally enable reflogs for tags, see
154154
`core.logAllRefUpdates` in linkgit:git-config[1].
155+
The negated form `--no-create-reflog` only overrides an earlier
156+
`--create-reflog`, but currently does not negate the setting of
157+
`core.logallrefupdates`.
155158

156159
<tagname>::
157160
The name of the tag to create, delete, or describe.

0 commit comments

Comments
 (0)