     (unless files
       (push (file-relative-name (read-file-name "File to ignore: " nil nil t)) files))
     (dolist (f files) (git-append-to-ignore f))
-    (git-update-status-files files 'ignored)))
+    (git-update-status-files files 'ignored)
+    (git-success-message "Ignored" files)))
 
 (defun git-remove-file ()
   "Remove the marked file(s)."

        ('deleted (push info deleted))
        ('modified (push info modified))))
    (when added
      (apply #'git-run-command nil env "update-index" "--add" "--" (git-get-filenames added)))
    (when deleted
      (apply #'git-run-command nil env "update-index" "--remove" "--" (git-get-filenames deleted)))
    (when modified
      (apply #'git-run-command nil env "update-index" "--" (git-get-filenames modified)))))

(defun git-run-pre-commit-hook ()
  "Run the pre-commit hook if any."

  (let ((files (git-get-filenames (git-marked-files-state 'unknown 'ignored))))
    (unless files
      (push (file-relative-name (read-file-name "File to add: " nil nil t)) files))
    (apply #'git-call-process-env nil nil "update-index" "--add" "--" files)
    (git-update-status-files files 'uptodate)
    (git-success-message "Added" files)))

(defun git-ignore-file ()
  "Add marked file(s) to the ignore list."
