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): usegixcrate which is a pure Rust implementation of Git. Nothing has to be installed alongside, and no C library is linked.--no-default-features: usegitcommand viastd::process::Command, which requiresgitto be on thePATH.
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
gixcrate 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.
- Gixor
Factory - 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§
- Alias
Manager - Provides the functions for management of the aliases.
- Repository
Manager - Provides the functions for management of the boilerplate repositories.
Functions§
- entries
- Finds the entries of
.gitignorefile in the given path. The given path should be a directory containing a.gitignorefile or a regular file which is treats as a.gitignorefile. If the.gitignorefile is not found, returnsError::FileNotFounderror. - find_
target_ repositories - Finds the target repositories by the given repository names.
Type Aliases§
- Result
- Represents the result of Gixor.