From 5b16b090211f549c501f2cd9e8ea1bd227a575c5 Mon Sep 17 00:00:00 2001 From: Shawn Pearce Date: Wed, 17 May 2006 05:55:19 -0400 Subject: Convert update-ref to use ref_lock API. This conversion also adds the '-m' switch to update-ref allowing the caller to record why the ref is changing. At present this is merely copied down into the ref_lock API. Signed-off-by: Shawn O. Pearce Signed-off-by: Junio C Hamano --- Documentation/git-update-ref.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/git-update-ref.txt') diff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt index 475237f19e..f0e710a6f8 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 ----------- -- cgit v1.2.3 From 6de08ae688b9f2426410add155079e04baff33bd Mon Sep 17 00:00:00 2001 From: Shawn Pearce Date: Wed, 17 May 2006 05:55:40 -0400 Subject: Log ref updates to logs/refs/ If config parameter core.logAllRefUpdates is true or the log file already exists then append a line to ".git/logs/refs/" whenever git-update-ref is executed. Each log line contains the following information: oldsha1 newsha1 committer 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 . An optional message may be included in the log line with the -m flag. Signed-off-by: Shawn O. Pearce Signed-off-by: Junio C Hamano --- Documentation/git-update-ref.txt | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'Documentation/git-update-ref.txt') diff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt index f0e710a6f8..dfbd886979 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/" 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 . -- cgit v1.2.3 From 7792cc2fa1574b66b69a38a816a9b4bdca5c3731 Mon Sep 17 00:00:00 2001 From: Shawn Pearce Date: Fri, 19 May 2006 05:15:50 -0400 Subject: Change order of -m option to update-ref. The actual position doesn't matter but most people prefer to see options appear before the arguments. Signed-off-by: Shawn O. Pearce Signed-off-by: Junio C Hamano --- Documentation/git-update-ref.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/git-update-ref.txt') diff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt index dfbd886979..e062030e91 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' [] [-m ] +'git-update-ref' [-m ] [] DESCRIPTION ----------- -- cgit v1.2.3