mirror of
https://github.com/atom/atom.git
synced 2026-02-12 23:55:10 -05:00
Move checkoutHeadRevision to Workspace.
This commit is contained in:
@@ -712,25 +712,6 @@ class TextEditor extends Model
|
||||
# via {Pane::saveItemAs}.
|
||||
getSaveDialogOptions: -> {}
|
||||
|
||||
checkoutHeadRevision: ->
|
||||
if @getPath()
|
||||
checkoutHead = =>
|
||||
@project.repositoryForDirectory(new Directory(@getDirectoryPath()))
|
||||
.then (repository) =>
|
||||
repository?.async.checkoutHeadForEditor(this)
|
||||
|
||||
if @config.get('editor.confirmCheckoutHeadRevision')
|
||||
@applicationDelegate.confirm
|
||||
message: 'Confirm Checkout HEAD Revision'
|
||||
detailedMessage: "Are you sure you want to discard all changes to \"#{@getFileName()}\" since the last Git commit?"
|
||||
buttons:
|
||||
OK: checkoutHead
|
||||
Cancel: null
|
||||
else
|
||||
checkoutHead()
|
||||
else
|
||||
Promise.resolve(false)
|
||||
|
||||
###
|
||||
Section: Reading Text
|
||||
###
|
||||
|
||||
Reference in New Issue
Block a user