Previously, the call to authors-prog was not properly escaped, so any
special characters in the Subversion username, such as spaces and
semi-colons, would be interpreted by the shell rather than being passed
in as the first argument. Now all unsafe characters are escaped using
"git rev-parse --sq-quote"
[ew: switched from "\Q..\E" to "rev-parse --sq-quote"]
Signed-off-by: Mark Lodato <lodatom@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Add a new option, --authors-prog, to git-svn that allows a more flexible
alternative (or supplement) to --authors-file. This allows more
advanced username operations than the authors file will allow. For
example, one may look up Subversion users via LDAP, or may generate the
name and email address from the Subversion username.
Notes:
* If both --authors-name and --authors-prog are given, the former is
tried first, falling back to the later.
* The program is called once per unique SVN username, and the result is
cached.
* The command-line argument must be the path to a program, not a generic
shell command line. The absolute path to this program is taken at
startup since the git-svn script changes directory during operation.
* The option is not enabled for `git svn log'.
[ew: fixed case where neither --authors-(name|prog) were defined]
Signed-off-by: Mark Lodato <lodatom@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>