<commit_before>#!/bin/bash
set -e
#Initialize gerrit if gerrit site dir is empty.
#This is necessary when gerrit site is in a volume.
if [ "$1" = '/var/gerrit/gerrit-start.sh' ]; then
  if [ -z "$(ls -A "$GERRIT_SITE")" ]; then
    echo "Initializing gerrit..."
    java -jar $GERRIT_WAR init --batch --no-auto-start -d $GERRIT_SITE
    if [ $? -eq 0 ]; then
      echo "Initializing OK."
    else
      echo "Something wrong..."
      cat $GERRIT_SITE/logs/error_log
    fi
    #Customize gerrit.config
    [ -z $CANONICAL_WEBURL ] || git config -f $GERRIT_SITE/etc/gerrit.config gerrit.canonicalWebUrl $CANONICAL_WEBURL
  fi
fi
exec "$@"<commit_msg>Add environment parameters for database<commit_after>#!/bin/bash
set -e
#Initialize gerrit if gerrit site dir is empty.
#This is necessary when gerrit site is in a volume.
if [ "$1" = '/var/gerrit/gerrit-start.sh' ]; then
  if [ -z "$(ls -A "$GERRIT_SITE")" ]; then
    echo "Initializing gerrit..."
    java -jar $GERRIT_WAR init --batch --no-auto-start -d $GERRIT_SITE
    if [ $? -eq 0 ]; then
      echo "Initializing OK."
    else
      echo "Something wrong..."
      cat $GERRIT_SITE/logs/error_log
    fi
  fi
  #Customize gerrit.config
  #Section gerrit
  [ -z $CANONICAL_WEBURL ] || git config -f $GERRIT_SITE/etc/gerrit.config gerrit.canonicalWebUrl $CANONICAL_WEBURL
  #Section database
  [ -z $DATABASE_TYPE ] || git config -f $GERRIT_SITE/etc/gerrit.config database.type $DATABASE_TYPE
  [ -z $DATABASE_HOSTNAME ] || git config -f $GERRIT_SITE/etc/gerrit.config database.hostname $DATABASE_HOSTNAME
  [ -z $DATABASE_DATABASE ] || git config -f $GERRIT_SITE/etc/gerrit.config database.database $DATABASE_DATABASE
  [ -z $DATABASE_USERNAME ] || git config -f $GERRIT_SITE/etc/secure.config database.username $DATABASE_USERNAME
  [ -z $DATABASE_PASSWORD ] || git config -f $GERRIT_SITE/etc/secure.config database.password $DATABASE_PASSWORD
fi
exec "$@"
{'fraction_non_alphanumeric': 0.1289817232375979, 'fraction_numerical': 0.0020887728459530026, 'mean_word_length': 3.374429223744292, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4584854', 'n_tokens_mistral': 734, 'n_tokens_neox': 704, 'n_words': 186}