summaryrefslogtreecommitdiff
path: root/bin/gitano-update-hook.in
diff options
context:
space:
mode:
Diffstat (limited to 'bin/gitano-update-hook.in')
-rw-r--r--bin/gitano-update-hook.in9
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/gitano-update-hook.in b/bin/gitano-update-hook.in
index 34acbf9..bb7d8fe 100644
--- a/bin/gitano-update-hook.in
+++ b/bin/gitano-update-hook.in
@@ -93,18 +93,24 @@ local context = {
-- Attempt to work out what's going on regarding the update.
+local action = "**UNKNOWN**"
+
if oldsha == nullsha and newsha ~= nullsha then
context["operation"] = "createref"
+ action = "creation"
elseif oldsha ~= nullsha and newsha == nullsha then
context["operation"] = "deleteref"
+ action = "deletion"
else
local base, msg = repo.git:merge_base(oldsha, newsha)
if not base then
gitano.log.fatal(msg)
elseif (base == true) or ((base) and (base == newsha)) then
context["operation"] = "updaterefnonff"
+ action = "non-ff update"
else
context["operation"] = "updaterefff"
+ action = "update"
end
end
@@ -283,7 +289,8 @@ end
gitano.log.info("Allowing ref update of",
refname, "from", oldsha, "to", newsha)
-gitano.log.syslog.info("Allowing ref update of", refname)
+gitano.log.syslog.info("Allowing ref", action, "of", refname,
+ "( was", oldsha, "is now", newsha, ")")
gitano.log.syslog.close()