<commit_before>class GitGui < Formula
  desc "Tcl/Tk UI for the git revision control system"
  homepage "https://git-scm.com"
  # NOTE: Please keep these values in sync with git.rb when updating.
  url "https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.31.0.tar.xz"
  sha256 "e8f162cbdb3283e13cd7388d864ed23485f1b046a19e969f12ed2685fb789a40"
  license "GPL-2.0-only"
  head "https://github.com/git/git.git", shallow: false

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_big_sur: "4a3bd222c3edf48528d77e7807d3b4723abd8ff3243361aafe964212c813ade0"
    sha256 cellar: :any_skip_relocation, big_sur:       "0d8803003a68cff4fe56dc8244b491af4d26c9ac9df76136fa826462925aeed7"
    sha256 cellar: :any_skip_relocation, catalina:      "60cb252e34234b9749fa9c757ad9b92a02ccd163896e36d90e99892d3d9407b0"
    sha256 cellar: :any_skip_relocation, mojave:        "e82720dcc0caeee5c7f8569d446969fe0a4cfd918cfc5c8a994259b32817cd26"
  end

  depends_on "tcl-tk"

  # Patch to fix Homebrew/homebrew-core#68798.
  # Remove when the following PR has been merged
  # and included in a release:
  # https://github.com/git/git/pull/944
  patch do
    url "https://github.com/git/git/commit/1db62e44b7ec93b6654271ef34065b31496cd02e.patch?full_index=1"
    sha256 "0c7816ee9c8ddd7aa38aa29541c9138997650713bce67bdef501b1de0b50f539"
  end

  def install
    # build verbosely
    ENV["V"] = "1"

    # By setting TKFRAMEWORK to a non-existent directory we ensure that
    # the git makefiles don't install a .app for git-gui
    # We also tell git to use the homebrew-installed wish binary from tcl-tk.
    # See https://github.com/Homebrew/homebrew-core/issues/36390
    tcl_bin = Formula["tcl-tk"].opt_bin
    args = %W[
      TKFRAMEWORK=/dev/null
      prefix=#{prefix}
      gitexecdir=#{bin}
      sysconfdir=#{etc}
      CC=#{ENV.cc}
      CFLAGS=#{ENV.cflags}
      LDFLAGS=#{ENV.ldflags}<commit_msg>git-gui: update 2.31.0 bottle.<commit_after>class GitGui < Formula
  desc "Tcl/Tk UI for the git revision control system"
  homepage "https://git-scm.com"
  # NOTE: Please keep these values in sync with git.rb when updating.
  url "https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.31.0.tar.xz"
  sha256 "e8f162cbdb3283e13cd7388d864ed23485f1b046a19e969f12ed2685fb789a40"
  license "GPL-2.0-only"
  head "https://github.com/git/git.git", shallow: false

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_big_sur: "4a3bd222c3edf48528d77e7807d3b4723abd8ff3243361aafe964212c813ade0"
    sha256 cellar: :any_skip_relocation, big_sur:       "0d8803003a68cff4fe56dc8244b491af4d26c9ac9df76136fa826462925aeed7"
    sha256 cellar: :any_skip_relocation, catalina:      "60cb252e34234b9749fa9c757ad9b92a02ccd163896e36d90e99892d3d9407b0"
    sha256 cellar: :any_skip_relocation, mojave:        "e82720dcc0caeee5c7f8569d446969fe0a4cfd918cfc5c8a994259b32817cd26"
    sha256 cellar: :any_skip_relocation, x86_64_linux:  "f5610e36699393a0711b58cf6bf5aa9df64022de5831126859709f2c9783f05a"
  end

  depends_on "tcl-tk"

  # Patch to fix Homebrew/homebrew-core#68798.
  # Remove when the following PR has been merged
  # and included in a release:
  # https://github.com/git/git/pull/944
  patch do
    url "https://github.com/git/git/commit/1db62e44b7ec93b6654271ef34065b31496cd02e.patch?full_index=1"
    sha256 "0c7816ee9c8ddd7aa38aa29541c9138997650713bce67bdef501b1de0b50f539"
  end

  def install
    # build verbosely
    ENV["V"] = "1"

    # By setting TKFRAMEWORK to a non-existent directory we ensure that
    # the git makefiles don't install a .app for git-gui
    # We also tell git to use the homebrew-installed wish binary from tcl-tk.
    # See https://github.com/Homebrew/homebrew-core/issues/36390
    tcl_bin = Formula["tcl-tk"].opt_bin
    args = %W[
      TKFRAMEWORK=/dev/null
      prefix=#{prefix}
      gitexecdir=#{bin}
      sysconfdir=#{etc}
      CC=#{ENV.cc}
      CFLAGS=#{ENV.cflags}
      LDFLAGS=#{ENV.ldflags}
{'fraction_non_alphanumeric': 0.09457403651115619, 'fraction_numerical': 0.17266734279918863, 'mean_word_length': 4.150130548302872, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 12, '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': '1257778', 'n_tokens_mistral': 1979, 'n_tokens_neox': 1608, 'n_words': 277}