From e1aa4c02a028567e0cc8b2450fd579996fbba4f3 Mon Sep 17 00:00:00 2001 From: Bart Kamphorst Date: Fri, 23 Aug 2019 20:24:18 +0200 Subject: [PATCH] Fix uploading (#1312). Requires updating git adapters. --- lib/gollum/app.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/gollum/app.rb b/lib/gollum/app.rb index 70d38c2d..37906b25 100644 --- a/lib/gollum/app.rb +++ b/lib/gollum/app.rb @@ -206,10 +206,9 @@ module Precious contents = ::File.read(tempfile) reponame = "#{dir}/#{filename}.#{format}" - options = { - :message => "Uploaded file to #{dir}/#{reponame}", - :parent => wiki.repo.head.commit, - } + options = { :message => "Uploaded file to #{dir}/#{reponame}" } + options[:parent] = wiki.repo.head.commit if wiki.repo.head + author = session['gollum.author'] unless author.nil? options.merge! author