Skip to main content

Crate gixor

Crate gixor 

Source
Expand description

Gixor is a tool to manage the boilerplate files (.gitignore). This is alternative tool of gibo written in Rust.

Also, this library provides an API of the Gitignore boilerplate management. The main structure of this library is Gixor.

§Example of Dump the boilerplate

use gixor::{Gixor, GixorFactory, Name, Result};

// load configuration file and build Gixor object.
let gixor = GixorFactory::load("testdata/config.json").unwrap();
gixor.prepare(true).unwrap(); // clone or update all repositories, if needed.
// create vec of Name instance.
let names = Name::parse_all(vec!["rust", "macos", "linux", "windows"]);
// dump the boilerplate of rust, macos, linux, and windows into stdout.
let r = gixor.dump(names, std::io::stdout(), false);

§Features

Gixor provides the following features for operating Git repositories.:

  • usegix (default): use gix crate which is a pure Rust implementation of Git. Nothing has to be installed alongside, and no C library is linked.
  • --no-default-features: use git command via std::process::Command, which requires git to be on the PATH.

Modules§

aliases
Module for managing aliases in the configuration. An alias is a named collection of boilerplates that can be referenced together. This module provides functionality to define, find, and merge aliases.
gitbridge
Git bridge module that abstracts over different Git backends. Provides functions to interact with Git repositories using either the gix crate or system Git commands based on feature flags.
repos
Module for managing repositories and boilerplates. This module provides functionality to define repositories, find boilerplates, and prepare repositories by cloning or pulling from remote sources.

Structs§

Gixor
Represents the main structure of Gixor, the engine for managing .gitignore boilerplates.
GixorFactory
The factory pattern for Gixor.
Name
The name of the boilerplate which contains the repository name and the boilerplate name. The repository name is repos::Repository::name. The boilerplate name is the file stem of the boilerplate (gitignore) file.

Enums§

Error
Represents an error of Gixor.

Traits§

AliasManager
Provides the functions for management of the aliases.
RepositoryManager
Provides the functions for management of the boilerplate repositories.

Functions§

entries
Finds the entries of .gitignore file in the given path. The given path should be a directory containing a .gitignore file or a regular file which is treats as a .gitignore file. If the .gitignore file is not found, returns Error::FileNotFound error.
find_target_repositories
Finds the target repositories by the given repository names.

Type Aliases§

Result
Represents the result of Gixor.