   :type '(choice (const :tag "Default" nil)
                  (string :tag "Email")))
 
-(defcustom git-commits-coding-system 'utf-8
+(defcustom git-commits-coding-system nil
   "Default coding system for the log message of git commits."
   :group 'git
-  :type 'coding-system)
+  :type '(choice (const :tag "From repository config" nil)
+                 (coding-system)))
 
 (defcustom git-append-signed-off-by nil
   "Whether to append a Signed-off-by line to the commit message before editing."

      (and (boundp 'add-log-mailing-address) add-log-mailing-address)
      (and (fboundp 'user-mail-address) (user-mail-address))
      (and (boundp 'user-mail-address) user-mail-address)))

(defun git-escape-file-name (name)
  "Escape a file name if necessary."

                               (git-get-committer-name) (git-get-committer-email)))))))
    (log-edit #'git-do-commit nil #'git-log-edit-files buffer)
    (setq font-lock-keywords (font-lock-compile-keywords git-log-edit-font-lock-keywords))
    (setq buffer-file-coding-system coding-system)
    (re-search-forward (regexp-quote (concat git-log-msg-separator "\n")) nil t)))

(defun git-find-file ()
