Skip to content

Commit ae3a3a6

Browse files
Jan WielemakerJan Wielemaker
Jan Wielemaker
authored and
Jan Wielemaker
committed
Pass base commit to gitty_update/5. Need to deal with proper error message.
1 parent 57f07a5 commit ae3a3a6

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

lib/storage.pl

+2-2
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
-> gitty_data(Dir, File, Data, _OldMeta)
164164
; option(data(Data), Dict, "")
165165
),
166-
meta_data(Request, Dict, Meta),
166+
meta_data(Request, Dir, Dict, Meta),
167167
storage_url(File, URL),
168168
gitty_update(Dir, File, Data, Meta, Commit),
169169
debug(storage, 'Updated: ~p', [Commit]),
@@ -189,7 +189,7 @@
189189
http_link_to_id(web_storage, path_postfix(File), HREF).
190190

191191
%% meta_data(+Request, +Dict, -Meta) is det.
192-
%% meta_data(+Request, Store, +Dict, -Meta) is det.
192+
%% meta_data(+Request, +Store, +Dict, -Meta) is det.
193193
%
194194
% Gather meta-data from the Request (user, peer) and provided
195195
% meta-data. Illegal and unknown values are ignored.

web/js/storage.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,6 @@ define([ "jquery", "config", "modal", "form", "gitty", "history", "tabbed",
284284
post = { data: data.getValue(),
285285
type: type.dataType
286286
};
287-
if ( data.meta ) { /* rename */
288-
post.previous = data.meta.commit;
289-
}
290287
} else {
291288
if ( !data.isClean(data.cleanGeneration) ) {
292289
post = { data: data.getValue(),
@@ -300,6 +297,8 @@ define([ "jquery", "config", "modal", "form", "gitty", "history", "tabbed",
300297

301298
if ( meta )
302299
post.meta = meta;
300+
if ( data.meta )
301+
post.previous = data.meta.commit;
303302

304303
$.ajax({ url: url,
305304
dataType: "json",

0 commit comments

Comments
 (0)