summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2013-05-16 17:59:27 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2013-05-16 17:59:27 +0100
commitca95775ad1bf14088333b86677525cecb62f0aef (patch)
tree67c78e6e3c54b1e92b069bfd9620aa1d78f1d2a1 /bin
parentf645f8e503311d4130da9047ee9bc43aec5dc8c7 (diff)
downloadgitano-ca95775ad1bf14088333b86677525cecb62f0aef.tar.gz
BIN: gitano-post-receive-hook fix for newlines in oldsha
Previously, oldsha could end up with a leading newline for all but the first ref altered during a push. This fix corrects that so that oldsha doesn't get newlines in it.
Diffstat (limited to 'bin')
-rw-r--r--bin/gitano-post-receive-hook.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/gitano-post-receive-hook.in b/bin/gitano-post-receive-hook.in
index bc5b88d..b272b17 100644
--- a/bin/gitano-post-receive-hook.in
+++ b/bin/gitano-post-receive-hook.in
@@ -80,7 +80,7 @@ end
local updates = {}
for oldsha, newsha, refname in
- (sio.stdin:read("*a")):gmatch("([^ ]+) ([^ ]+) ([^\n]+)") do
+ (sio.stdin:read("*a")):gmatch("([^ ]+) ([^ ]+) ([^\n]+)\n?") do
gitano.log.ddebug("post-receive:", oldsha, newsha, refname)
updates[refname] = {oldsha, newsha, oldsha=oldsha, newsha=newsha}
end