diff options
author | Shawn Pearce <spearce@spearce.org> | 2006-05-17 05:55:40 -0400 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-05-17 17:36:36 -0700 |
commit | 6de08ae688b9f2426410add155079e04baff33bd (patch) | |
tree | a2d4e5a853ad2b13bf587465104afd39079f322b /Documentation/git-update-ref.txt | |
parent | 5b16b090211f549c501f2cd9e8ea1bd227a575c5 (diff) | |
download | git-6de08ae688b9f2426410add155079e04baff33bd.tar.gz git-6de08ae688b9f2426410add155079e04baff33bd.tar.xz |
Log ref updates to logs/refs/<ref>
If config parameter core.logAllRefUpdates is true or the log
file already exists then append a line to ".git/logs/refs/<ref>"
whenever git-update-ref <ref> is executed. Each log line contains
the following information:
oldsha1 <SP> newsha1 <SP> committer <LF>
where committer is the current user, date, time and timezone in
the standard GIT ident format. If the caller is unable to append
to the log file then git-update-ref will fail without updating <ref>.
An optional message may be included in the log line with the -m flag.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'Documentation/git-update-ref.txt')
-rw-r--r-- | Documentation/git-update-ref.txt | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt index f0e710a6f..dfbd88697 100644 --- a/Documentation/git-update-ref.txt +++ b/Documentation/git-update-ref.txt @@ -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/<ref>" exists then `git-update-ref` will append +a line to the log file "$GIT_DIR/logs/<ref>" (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 <ref>, "newsha1" is the 40 character hexadecimal value of +<newvalue> 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 <ref>) 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 <torvalds@osdl.org>. |