summaryrefslogtreecommitdiff
path: root/t/t9138-git-svn-authors-prog.sh
AgeCommit message (Collapse)Author
2018-04-11Merge branch 'svn/authors-prog-2' of git://bogomips.org/git-svnJunio C Hamano
* 'svn/authors-prog-2' of git://bogomips.org/git-svn: git-svn: allow empty email-address using authors-prog and authors-file git-svn: search --authors-prog in PATH too
2018-04-05git-svn: allow empty email-address using authors-prog and authors-fileAndreas Heiduk
The email address in --authors-file and --authors-prog can be empty but git-svn translated it into a fictional email address in the form jondoe <jondoe@6aafaa21e0fb4338a68ab372a049893d> containing the SVN repository UUID. Now git-svn behaves like git-commit: If the email is *explicitly* set to the empty string using '<>', the commit does not contain an email address, only the name: jondoe <> Allowing to remove the email address *intentionally* prevents automatic systems from sending emails to those fictional addresses and avoids cluttering the log output with unnecessary stuff. Signed-off-by: Andreas Heiduk <asheiduk@gmail.com> Signed-off-by: Eric Wong <e@80x24.org>
2018-03-28test: avoid pipes in git related commands for testPratik Karki
Avoid using pipes downstream of Git commands since the exit codes of commands upstream of pipes get swallowed, thus potentially hiding failure of those commands. Instead, capture Git command output to a file and apply the downstream command(s) to that file. Signed-off-by: Pratik Karki <predatoramigo@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-12t9138-git-svn-authors-prog.sh: use the $( ... ) construct for command ↵Elia Pinto
substitution The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg' "${_f}" done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-27t9138-git-svn-authors-prog.sh fixupsJeremiah Mahler
Several fixups of the t9138-git-svn-authors-prog.sh test script to follow current recommendations in t/README. - Fixed a Perl script with a full "#!/usr/bin/perl" shebang to use write_script() and $PERL_PATH as per t/README. - Placed svn-authors data setup inside a test_expect_success. - Fixed trailing quotes to use the same indentation throughout. Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13svn: properly escape arguments for authors-progMark Lodato
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>
2009-05-21git-svn: add --authors-prog optionMark Lodato
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>