From f4838d12c6a4b1d8475b774bb42a51e1fbec59be Mon Sep 17 00:00:00 2001 From: Bart Kamphorst Date: Tue, 20 Nov 2018 15:04:32 +0100 Subject: [PATCH] Return the page's most recent version instead of random string. --- lib/gollum/app.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/gollum/app.rb b/lib/gollum/app.rb index e68443ad..ae477226 100644 --- a/lib/gollum/app.rb +++ b/lib/gollum/app.rb @@ -287,7 +287,8 @@ module Precious return if page.nil? if etag != page.sha - halt 412, 'For future use: some helpful data for resolving the conflict here.' + # Signal edit collision and return the page's most recent version + halt 412, {etag: page.sha, text_data: page.text_data}.to_json end committer = Gollum::Committer.new(wiki, commit_message)