magit/magit — pull request #1192 by mgalgs (2014-02-07 06:37:17+00:00)
Title: magit-emacsclient-executable: discover emacsclient name via pattern match

It's possible to configure Emacs with `--program-suffix=-suffix` which
results in the `emacsclient` executable being named
`emacsclient-suffix`. For example, it's not uncommon to track the Emacs
development repository and configure Emacs with `--program-suffix=-git` or
`--program-suffix=-bzr`.

The current search patterns all assume Emacs wasn't configured with a
program suffix. Fix this by searching the `invocation-directory` for any
program that matches the regexp: `emacsclient.*`.