<commit_before>object Versioning {
  import com.typesafe.sbt.SbtGit._
  import com.typesafe.sbt.SbtGit.GitKeys._
  import com.typesafe.sbt.GitVersioning

  lazy val settings = Seq(
    git.useGitDescribe := true,
    git.baseVersion := "0.0.1",
    git.gitDescribedVersion := gitReader.value.withGit(_.describedVersion).flatMap(v =>
      Option(v).map(_.drop(1)).orElse(formattedShaVersion.value).orElse(Some(git.baseVersion.value))
    )
  )

  val Plugin = GitVersioning

}<commit_msg>workaround for jgit bug<commit_after>import com.typesafe.sbt.SbtGit._
import com.typesafe.sbt.SbtGit.GitKeys._
import com.typesafe.sbt.GitVersioning
import scala.util.Try
import sbt._
import sbt.Keys._

object Versioning {
  /**
    * Currently there is a problem with JGit where it returns a wrong
    * git describe version, so we use git directly
    */
  lazy val consoleGitDescribe = Try("git describe".!!).toOption.map(_.trim)

  lazy val settings = Seq(
    git.useGitDescribe := true,
    git.baseVersion := "0.0.1",
    git.gitDescribedVersion := consoleGitDescribe
      orElse gitReader.value.withGit(_.describedVersion)
      map(_.drop(1))
      orElse formattedShaVersion.value
      orElse Some(git.baseVersion.value)
  )

  val Plugin = GitVersioning
}
{'fraction_non_alphanumeric': 0.11305732484076433, 'fraction_numerical': 0.006369426751592357, 'mean_word_length': 3.707865168539326, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '1040468', 'n_tokens_mistral': 452, 'n_tokens_neox': 422, 'n_words': 84}