setup_reflog_action: document the rules for using GIT_REFLOG_ACTION
[gitweb.git] / Documentation / git.txt
index 9e302b0a60552c4297cb94018dad49169505bd35..78db385fb73c0f71db68516a63e857b9f0d194e0 100644 (file)
@@ -841,6 +841,16 @@ GIT_LITERAL_PATHSPECS::
        literal paths to Git (e.g., paths previously given to you by
        `git ls-tree`, `--raw` diff output, etc).
 
+'GIT_REFLOG_ACTION'::
+       When a ref is updated, reflog entries are created to keep
+       track of the reason why the ref was updated (which is
+       typically the name of the high-level command that updated
+       the ref), in addition to the old and new values of the ref.
+       A scripted Porcelain command can use set_reflog_action
+       helper function in `git-sh-setup` to set its name to this
+       variable when it is invoked as the top level command by the
+       end user, to be recorded in the body of the reflog.
+
 
 Discussion[[Discussion]]
 ------------------------