Skip to content

Commit

Permalink
test using git config --get remote.origin.url
Browse files Browse the repository at this point in the history
  • Loading branch information
GrantBirki committed Sep 3, 2024
1 parent 67fedfc commit 5914fb9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/resolvers/git.cr
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ module Shards
end

private def origin_url
@origin_url ||= capture("git -C #{local_path} ls-remote --get-url origin --bare").strip
@origin_url ||= capture("git -C #{local_path} config --get remote.origin.url").strip
end

# Returns whether origin URLs have differing hosts and/or paths.
Expand Down Expand Up @@ -450,7 +450,7 @@ module Shards
Dir.exists?(path) || raise(Error.new("Path #{path} does not exist"))
end

Log.debug { "command: `#{command}` path: `#{path}` capture: `#{capture}` local_path: `#{local_path}`" }
Log.debug { "command: `#{command}` path: `#{path}` capture: `#{capture}`" }

output = capture ? IO::Memory.new : Process::Redirect::Close
error = IO::Memory.new
Expand Down

0 comments on commit 5914fb9

Please sign in to comment.