RESOLVED FIXED 16024
prepare-Changelog needs to use git repo-config if git config fails
https://bugs.webkit.org/show_bug.cgi?id=16024
Summary prepare-Changelog needs to use git repo-config if git config fails
Ryan Leavengood
Reported 2007-11-16 21:26:56 PST
It seems the git command to get configuration information has changed from config to repo-config recently. If someone runs the current prepare-Changelog with a newer git the ChangeLog gets two git error messages inserted instead of their name and email. The attached patch fixes that. I am not a Perl programmer so bear with me, but it is a simple change and works for me. I hope git formatted patches are acceptable.
Attachments
Try git config, then git repo-config if the first fails (1.03 KB, patch)
2007-11-16 21:32 PST, Ryan Leavengood
ddkilzer: review-
Use exit status instead of regular expression (991 bytes, patch)
2007-11-16 22:14 PST, Ryan Leavengood
ddkilzer: review+
David Kilzer (:ddkilzer)
Comment 1 2007-11-16 21:30:50 PST
(In reply to comment #0) > The attached patch fixes that. I am not a Perl programmer so bear with me, but > it is a simple change and works for me. I hope git formatted patches are > acceptable. They are acceptable. Please note the contribution guidelines here: http://webkit.org/coding/contributing.html
Ryan Leavengood
Comment 2 2007-11-16 21:32:05 PST
Created attachment 17326 [details] Try git config, then git repo-config if the first fails
David Kilzer (:ddkilzer)
Comment 3 2007-11-16 22:06:05 PST
Comment on attachment 17326 [details] Try git config, then git repo-config if the first fails > my $result = `$GIT config $config`; >+ if ($result =~ /is not a git-command/) { >+ $result = `$GIT repo-config $config`; >+ } I think it would be best to check the exit value of the backtick command instead of the error text: if (($? >> 8) != 0) { Also, please use the same indention rules as the rest of the script. Please make these changes and repost. Thanks!
Ryan Leavengood
Comment 4 2007-11-16 22:14:44 PST
Created attachment 17329 [details] Use exit status instead of regular expression I also converted the tabs to spaces, sorry about that.
David Kilzer (:ddkilzer)
Comment 5 2007-11-16 22:18:12 PST
Comment on attachment 17329 [details] Use exit status instead of regular expression r=me Thanks!
David Kilzer (:ddkilzer)
Comment 6 2007-11-16 22:43:12 PST
Committed revision 27870.
Note You need to log in before you can comment on or make changes to this bug.