Magit-process doesn't show ellipsis for magit-git-global-arguments

What happened?

When you open magit in a git repo (C-x g) and perform some action (e.g. commit) you can open the magit-process buffer to see what commands magit ran (from the magit status page, press backtick on doom emacs, $ on vanilla magit)

On doom emacs, it always shows all the parameters without ellipsis:

What did you expect to happen?

On vanilla emacs with magit installed, the common options that magit applies to every command, defined in the variable magit-git-global-arguments, are replaced by an ellipsis character, and it looks like this:

This is what I expect to happen.

Steps to reproduce

  1. Install doom emacs
  2. Open some file in a git repo
  3. Make a change
  4. C-x g, c c, answer yes to Commit all uncommited changes
  5. Write a commit message
  6. C-c C-c
  7. Press ``` (backtick)
  8. See that the open buffer lists the commands with the whole parameter list unellided (git --no-pager --literal-pathspecs -c core.preloadindex\=true -c log.showSignature\=false ...)

System information


Loading data dump...

Other info

https://emacs.stackexchange.com/questions/74176/when-i-do-magit-process-buffer-it-shows-an-ellipsis-what-is-behin

I found the culprit, this bit of code in modules/tools/magit/config.el:

  (add-hook! 'magit-status-mode-hook
    (defun +magit-optimize-process-calls-h ()
      (when-let (path (executable-find magit-git-executable t))
        (setq-local magit-git-executable path))))

According to the magit documentation, magit itself already does this optimization in windows and macOS, so I suspect the hook could be removed entirely.