                   filePath = file.filename
                   model = allContent.get(filePath)
 
-                  if model
+                  if model?._loading
                     # TODO: Just invalidate the model by clearing `isLoaded`
                     return model.reload().then () =>
                       attributes =


      # Return a promise that is resolved once a start hash has been recorded
      # Note: This promise may still fail
      return @pollUpdates()

    stop: () -> @keepUpdating = false


    # Returns a promise that is resolved when `@lastSeenSha` has been set.
    pollUpdates: () ->
      return if not @keepUpdating

      return allContent.load().then () =>
        branch = session.getBranch()

        return branch.getCommits().then (commits) =>
          lastUpdatedSha = @lastSeenSha

          lastSeenSha = commits[0].sha

          setTimeout (() => @pollUpdates()), UPDATE_TIMEOUT

          if not lastUpdatedSha
            @lastSeenSha = lastSeenSha

    # This is updated every time the Remote Updater fetches
    lastSeenSha: null

    initialize: () ->
      # If the session config changes then clear the lastSeenSha because it may point to a different repo
      session.on 'change', () =>
        @lastSeenSha = null

    start: () ->
      # Get the current repo and last commit
      # Periodically check the commits list
