title: How to check if a git commit author is valid
body: <p>In a repository where I cant set both <code>user.name</code> and <code>user.email</code> configurations I need to script a commit with:</p>
  
  <pre><code>commit -a --message "message" --author="author"
  </code></pre>
  
  <p>Message and author are parametrized.</p>
  
  <p>When I commit with a wrong author (not present on <code>rev-list</code> and bad formatted for git) I get:</p>
  
  <blockquote>
    <p>fatal: --author 'bad-formatted-author' is not 'Name ' and matches no existing author</p>
  </blockquote>
  
  <p>Is there any way to check against git if the author is valid before the commit?</p>