Log environment variables during GC

Log the environment variables used to configure the GC script to allow
tracking what the configuration was at the time of execution.

Change-Id: I51ab35fc32695caf8eaa0812bdd9daee8022859c
diff --git a/maintenance/git-gc/scripts/utils.sh b/maintenance/git-gc/scripts/utils.sh
index 8197a75..7b3e6ce 100755
--- a/maintenance/git-gc/scripts/utils.sh
+++ b/maintenance/git-gc/scripts/utils.sh
@@ -18,6 +18,8 @@
     return 1
   }
 
+  log_env
+
   print_stats "$proj" "before"
   do_gc "$proj"
   print_stats "$proj" "after"
@@ -101,6 +103,19 @@
    echo "$out"
 }
 
+function log_env() {
+  log "######## ENVIRONMENT ########"
+  log "# JGIT=${JGIT}"
+  log "# GIT=${GIT}"
+  log "# GIT_HOME=${GIT_HOME}"
+  log "# GIT_GC_OPTION=${GIT_GC_OPTION}"
+  log "# PACK_THREADS=${PACK_THREADS}"
+  log "# PRUNE_EXPIRE=${PRUNE_EXPIRE}"
+  log "# PRUNE_PACK_EXPIRE=${PRUNE_PACK_EXPIRE}"
+  log "# JAVA_ARGS=${JAVA_ARGS}"
+  log "############################"
+}
+
 function now {
   date -u '+%FT%TZ'
 }