+sub gitmark($) {
+ my($s)=@_;
+ return "" if $s!~m{^(... )([^/]*/+[^/]*)/};
+ my($pfx,$dir)=($1,$2);
+ local *GIT;
+ $dir.="/build/gdbgit";
+ return "" if !-d $dir;
+ open GIT,"cd '$dir';git log --format=%H HEAD^..HEAD|" or return "";
+ my $git=do { local $/; <GIT>; };
+ close GIT;
+ chomp $git;
+ return "${pfx}GIT commit $git\n" if $git=~/^[0-9a-f]{40}$/;
+ return "";
+}
+