Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Formula/g/git-branchless.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class GitBranchless < Formula
url "https://github.com/arxanas/git-branchless/archive/refs/tags/v0.9.0.tar.gz"
sha256 "fa64dc92ec522520a6407ff61241fc1819a3093337b4e3d0f80248ae76938d43"
license any_of: ["Apache-2.0", "MIT"]
revision 1
head "https://github.com/arxanas/git-branchless.git", branch: "master"

# Upstream appears to use GitHub releases to indicate that a version is
Expand All @@ -26,7 +27,7 @@ class GitBranchless < Formula

depends_on "pkg-config" => :build
depends_on "rust" => :build
depends_on "libgit2"
depends_on "libgit2@1.7"

def install
ENV["LIBGIT2_NO_VENDOR"] = "1"
Expand All @@ -50,7 +51,7 @@ def install
linkage_with_libgit2 = (bin/"git-branchless").dynamically_linked_libraries.any? do |dll|
next false unless dll.start_with?(HOMEBREW_PREFIX.to_s)

File.realpath(dll) == (Formula["libgit2"].opt_lib/shared_library("libgit2")).realpath.to_s
File.realpath(dll) == (Formula["libgit2@1.7"].opt_lib/shared_library("libgit2")).realpath.to_s
end

assert linkage_with_libgit2, "No linkage with libgit2! Cargo is likely using a vendored version."
Expand Down