     (define-key map "q"   'git-status-quit)
     (define-key map "r"   'git-remove-file)
     (define-key map "R"   'git-resolve-file)
+    (define-key map "t"    toggle-map)
     (define-key map "T"   'git-toggle-all-marks)
     (define-key map "u"   'git-unmark-file)
     (define-key map "U"   'git-revert-file)

  (interactive)
  (ewoc-filter git-status
               (lambda (info)
                 (not (or (eq (git-fileinfo->state info) 'ignored)
                          (eq (git-fileinfo->state info) 'uptodate)))))
  (unless (ewoc-nth git-status 0)  ; refresh header if list is empty
    (git-refresh-ewoc-hf git-status)))

(defun git-setup-diff-buffer (buffer)
  "Setup a buffer for displaying a diff."

    (define-key diff-map "h" 'git-diff-file-merge-head)
    (define-key diff-map "m" 'git-diff-file-mine)
    (define-key diff-map "o" 'git-diff-file-other)
    ; the toggle submap
    (define-key toggle-map "u" 'git-toggle-show-uptodate)
    (define-key toggle-map "i" 'git-toggle-show-ignored)
    (define-key toggle-map "k" 'git-toggle-show-unknown)
    (define-key toggle-map "m" 'git-toggle-all-marks)
    (setq git-status-mode-map map)))

;; git mode should only run in the *git status* buffer
