contrib/
authorTrevor Saunders <tsaunders@mozilla.com>
Mon, 21 Jul 2014 07:39:40 +0000 (07:39 +0000)
committerYury Gribov <ygribov@gcc.gnu.org>
Mon, 21 Jul 2014 07:39:40 +0000 (07:39 +0000)
2014-07-21  Trevor Saunders  <tsaunders@mozilla.com>

mklog: Read name and email from git config when available.

From-SVN: r212883

contrib/ChangeLog
contrib/mklog

index 3a94c98..b714b88 100644 (file)
@@ -1,3 +1,7 @@
+2014-07-21  Trevor Saunders  <tsaunders@mozilla.com>
+
+       mklog: Read name and email from git config when available.
+
 2014-06-28  Richard Biener  <rguenther@suse.de>
 
        * gennews: Use gcc-3.0/index.html.
index fb489b0..5f5d98e 100755 (executable)
@@ -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