diff options
author | Trevor Saunders <tsaunders@mozilla.com> | 2014-07-21 07:39:40 +0000 |
---|---|---|
committer | Yury Gribov <ygribov@gcc.gnu.org> | 2014-07-21 07:39:40 +0000 |
commit | 863aa163a0dd338c392485f72e32e95ee516f2e8 (patch) | |
tree | 4f908e5f0da1986e6b7715493b72ee7891c32317 /contrib/mklog | |
parent | 5be1f50e6ba15ce0b2ebb2db5841cdf597a5260c (diff) | |
download | gcc-863aa163a0dd338c392485f72e32e95ee516f2e8.zip gcc-863aa163a0dd338c392485f72e32e95ee516f2e8.tar.gz gcc-863aa163a0dd338c392485f72e32e95ee516f2e8.tar.bz2 |
contrib/
2014-07-21 Trevor Saunders <tsaunders@mozilla.com>
mklog: Read name and email from git config when available.
From-SVN: r212883
Diffstat (limited to 'contrib/mklog')
-rwxr-xr-x | contrib/mklog | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/contrib/mklog b/contrib/mklog index fb489b0..5f5d98e 100755 --- a/contrib/mklog +++ b/contrib/mklog @@ -38,6 +38,20 @@ $gcc_root = $0; $gcc_root =~ s/[^\\\/]+$/../; chdir $gcc_root; +# if this is a git tree then take name and email from the git configuration +if (-d .git) { + $gitname = `git config user.name`; + chomp($gitname); + if ($gitname) { + $name = $gitname; + } + + $gitaddr = `git config user.email`; + chomp($gitaddr); + if ($gitaddr) { + $addr = $gitaddr; + } +} #----------------------------------------------------------------------------- # Program starts here. You should not need to edit anything below this |