{"thread":{"id":"27272","subject":"[PATCH] Enable tilde expansion for svn.authorsprog parameter","startedAt":"2011-05-05T16:47:28Z","lastAt":"2011-05-05T16:47:28Z","messageCount":1,"participants":["Robert Quattlebaum"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"167128","messageId":"BD234792-3C9E-413A-84BC-24ADD1028B5D@deepdarc.com","threadId":"27272","inReplyTo":null,"subject":"[PATCH] Enable tilde expansion for svn.authorsprog parameter","fromName":"Robert Quattlebaum","fromEmail":"darco@deepdarc.com","sentAt":"2011-05-05T16:47:28Z","receivedAt":"2011-05-05T16:47:28Z","isPatch":true,"sender":{"key":"darco@deepdarc.com","avatar":"https://gravatar.com/avatar/30254002c666c9d044dacb8250098bfccc718109066b1a295e8b04b1f5d679ea?d=mp&s=160"},"body":"While tilde (~) expansion often happens automatically at the command\nline, it does not occur automatically for paths specified in the\ngit configuration file. This is unfortunate because it is often\nuseful to specify path names relative to the current user's (or\nsome other user's) home directory.  This patch adds support for\ntilde expansion for the svn.authorsprog configuraiton option using\nperl's glob() function.\n\nAs a side effect of this change, if you pass an 'authors-prog' via\nthe command line that it will be subjected to tilde expansion\n*twice*. This is only a problem for usernames that have real tildes\nor wildcards in them, which should be extraordinarily rare.\n\nAlso, since tilde expansion is performed using glob(), there is a\nchance that if the authors-prog contains a wild card that it will\nmatch multiple executables. In such a case the behavior will almost\ncertainly be undesirable.\n\nI'm submitting this patch more for discussion than for consideration\nat this point. I feel that there might be a better way to go about\nthis, but I'm not familiar enough with the codebase to know what\nthat might be.\n\nSigned-off-by: Robert Quattlebaum <darco@deepdarc.com>\n---\n git-svn.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 0fd2fd2..ff2591e 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -307,7 +307,7 @@ version() if $_version;\n usage(1) unless defined $cmd;\n load_authors() if $_authors;\n if (defined $_authors_prog) {\n-\t$_authors_prog = \"'\" . File::Spec->rel2abs($_authors_prog) . \"'\";\n+\t$_authors_prog = \"'\" . File::Spec->rel2abs(glob($_authors_prog)) . \"'\";\n }\n \n unless ($cmd =~ /^(?:clone|init|multi-init|commit-diff)$/) {\n-- \n1.7.4.1\n\n\n__________________\nRobert Quattlebaum\nJabber: darco@deepdarc.com\neMail:  darco@deepdarc.com\nwww:    http://www.deepdarc.com/\n"}]}