X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=Documentation%2Fgit-update-ref.txt;h=e062030e91ae2b2a25c2ef7bafc4c026015e1f5e;hb=ae448e3854d8b6e7e37aa88fa3917f5dd97f3210;hp=475237f19e0fb4fb3a05b857784413a295f5d3b8;hpb=3bcd59a546333ae355c87577ba63f8dccd50a519;p=git.git diff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt index 475237f1..e062030e 100644 --- a/Documentation/git-update-ref.txt +++ b/Documentation/git-update-ref.txt @@ -7,7 +7,7 @@ git-update-ref - update the object name stored in a ref safely SYNOPSIS -------- -'git-update-ref' [] +'git-update-ref' [-m ] [] DESCRIPTION ----------- @@ -49,6 +49,32 @@ for reading but not for writing (so we'll never write through a ref symlink to some other tree, if you have copied a whole archive by creating a symlink tree). +Logging Updates +--------------- +If config parameter "core.logAllRefUpdates" is true or the file +"$GIT_DIR/logs/" exists then `git-update-ref` will append +a line to the log file "$GIT_DIR/logs/" (dereferencing all +symbolic refs before creating the log name) describing the change +in ref value. Log lines are formatted as: + + . oldsha1 SP newsha1 SP committer LF ++ +Where "oldsha1" is the 40 character hexadecimal value previously +stored in , "newsha1" is the 40 character hexadecimal value of + and "committer" is the committer's name, email address +and date in the standard GIT committer ident format. + +Optionally with -m: + + . oldsha1 SP newsha1 SP committer TAB message LF ++ +Where all fields are as described above and "message" is the +value supplied to the -m option. + +An update will fail (without changing ) if the current user is +unable to create a new log file, append to the existing log file +or does not have committer information available. + Author ------ Written by Linus Torvalds .