Skip to content

Commit

Permalink
Remove dysfunctional GitResolver#matches? (#460)
Browse files Browse the repository at this point in the history
The method does not work anymore because there is not variable or
method `dependency`.
  • Loading branch information
f-fr authored Jan 21, 2021
1 parent 2440f81 commit 03d9b2f
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/resolvers/git.cr
Original file line number Diff line number Diff line change
Expand Up @@ -195,21 +195,6 @@ module Shards
.compact_map { |tag| Version.new($1) if tag =~ VERSION_TAG }
end

def matches?(commit)
if branch = dependency["branch"]?
capture("git branch --list #{GitResolver.git_column_never} --contains #{commit}")
.split('\n')
.compact_map { |line| $1? if line =~ /^[* ] (.+)$/ }
.includes?(branch)
elsif tag = dependency["tag"]?
capture("git tag --list #{GitResolver.git_column_never} --contains #{commit}")
.split('\n')
.includes?(tag)
else
!capture("git log -n 1 #{commit}").strip.empty?
end
end

def install_sources(version : Version, install_path : String)
update_local_cache
ref = git_ref(version)
Expand Down

0 comments on commit 03d9b2f

Please sign in to comment.