Nothing has been indexed for 1.1.1 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.

Installation

# Add this to your shard.yml
dependencies:
  git-repository:
    github: place-labs/git-repository
    version: ~> 1.1.1

Then run:

shards install

shard.yml

No shard.yml has been indexed for 1.1.1. You can read it on the repository.

Dependencies

Unknown: the shard.yml for this version has not been read yet.

README

This README is the one indexed from the repository at its latest ref, not from the tag for this version.

Git Client for inspecting remote git repositories

CI

The aim of this shard is to inspect any remote git repository

  • fetch repository details remotely (default branch, branches and tags)
  • obtain log history without downloading any files
  • fetch any branch, tag or commit without downloading history. Minimal data transfer

Installation

Add the dependency to your shard.yml:

  dependencies:
    git-repository:
      github: place-labs/git-repository

Usage

NOTE:: We shell out to git to perform these operations


repo = GitRepository.new("https://github.com/your/repo", "optional_user", "optional_pass")

repo.default_branch # => "main"
repo.branches       # => {"feature1" => "<head_hash>", "main" => "<head_hash>"}
repo.tags           # => {"v1.1.0" => "<commit_hash>", "v1.0.0" => "<commit_hash>"}
repo.commits("main", depth: 5) # => [Commit]

# Fetch the head of the selected branch
repo.fetch_branch("main", "./your_repo_folder")

# Fetch the repo at a specific commit or tag
repo.fetch_commit("v1.1.0", "./your_repo_folder")