     readDir =        (path) -> session.getBranch().contents   path
 
 
+    # Only support reading 1 file at a time.
+    # Writing is done in batch by save (for multifile commits and conflict resolution).
     Backbone.sync = (method, model, options) ->
 
       path = model.id or model.url?() or model.url

      ret = null
      switch method
        when 'read' then ret = readFile(path, model.isBinary)
        when 'update' then ret = writeFile(path, model, 'Editor Update', model.isBinary)
        when 'create' then ret = writeFile(path, model, 'Editor Create', model.isBinary)
        else throw "Model sync method not supported: #{method}"

      ret.done (value) => options?.success?(value)



    # Github read/write and repo configuration
    writeFiles = (models, commitText) ->
      parentCommitSha = remoteUpdater.lastSeenSha
      promise = $.Deferred()
