 
 ;; When git.el is loaded, hack into keymap.
 (when (boundp 'git-status-mode-map)
-  (define-key git-status-mode-map "s" 'gitsum))
+  (define-key git-status-mode-map "s" 'gitsum-switch-from-git-status))
 
 ;; Undo doesn't work in read-only buffers else.
 (defun gitsum-undo ()

  (interactive)
  (git-status default-directory))

(defun gitsum ()
  "Entry point into gitsum-diff-mode."
  (interactive)

  (let ((inhibit-read-only t))
    (undo)))

(defun gitsum-refresh (&optional arguments)
  "Regenerate the patch based on the current state of the index."
  (interactive)
  (let ((inhibit-read-only t))
