[openssl-dev] [openssl.org #4597] Print Git repo information during configure

noloader@gmail.com via RT rt at openssl.org
Wed Jun 29 03:21:08 UTC 2016


The attached adds Git repo information if its available.

In the "things work as expected" case, the repo information is
available. It will be submitted with bug reports when configuration
information is provided.

In the "its not a repo" case, then the call to system fails and
nothing is printed. This is no worse than you have now.

$ cat Configure.diff
diff --git a/Configure b/Configure
index ee0b4a7..2059fe1 100755
--- a/Configure
+++ b/Configure
@@ -232,6 +232,13 @@ if (defined $ENV{$local_config_envname}) {

 print "Configuring OpenSSL version $config{version}
(0x$config{version_num})\n";

+my $git_repo = system("git rev-parse HEAD >/dev/null 2>&1");
+if ($git_repo == 0) {
+    chomp(my $branch =`git rev-parse --abbrev-ref HEAD`);
+    chomp(my $revision = `git rev-parse HEAD`);
+    print "Git branch $branch, commit $revision\n";
+}
+
 $config{prefix}="";
 $config{openssldir}="";
 $config{processor}="";


-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=4597
Please log in as guest with password guest if prompted



More information about the openssl-dev mailing list