         new StatusView(type: 'alert', message: data.toString())
       exit: (code) ->
         new StatusView(type: 'success', message: "Tag '#{tag.name}' has been created successfully!") if code is 0
-    @detach()
+    @destroy()
 
-  abort: ->
-    @detach()
+  destroy: ->
+    @panel.destroy()

          @button class: 'btn btn-error inline-block-tight gp-cancel-button', click: 'abort', 'Cancel'

  initialize: ->
    atom.workspaceView.append this
    @tagName.focus()
    @on 'core:cancel', => @abort()

  createTag: ->
    tag = name: @tagName.text().slice(2), message: @tagMessage.text().slice(2)
    new BufferedProcess
      command: 'git'
      args: ['tag', '-a', tag.name, '-m', tag.message]

Path = require 'path'
fs = require 'fs-plus'

{BufferedProcess} = require 'atom'
{$, TextEditorView, View} = require 'atom-space-pen-views'
StatusView = require './status-view'
git = require '../git'

