package
0.0.0-20211026085202-854ad97855da
Repository: https://github.com/g-node/gin-cli.git
Documentation: pkg.go.dev

# Packages

Package shell augments the standard library os/exec Cmd struct and functions with convenience functions for reading piped output.

# Functions

Add adds paths to git directly (not annex).
AnnexAdd adds paths to the annex.
AnnexCommand sets up a git annex command with the provided arguments and returns a GinCmd struct.
AnnexContentLocation returns the location of the content for a given annex key.
AnnexDescribe changes the description of a repository.
AnnexDrop drops the content of specified files.
AnnexFind lists available annexed files in the current directory.
AnnexFromKey creates an Annex placeholder file at a given location with a specific key.
AnnexFsck runs fsck (filesystem check) on the specified files, fixing any issues with the annexed files in the working tree.
AnnexGet retrieves the content of specified files.
AnnexGetKey retrieves the content of a single specified key.
AnnexInfo returns the annex information for a given repository (git annex info).
AnnexInit initialises the repository for annex.
AnnexLock locks the specified files and directory contents if they are annexed.
AnnexPull downloads all annexed files.
AnnexPush uploads all changes and new content to the default remote.
AnnexStatus returns the status of a file or files in a directory The output channel 'statuschan' is closed when this function returns.
AnnexSync performs a bidirectional synchronisation between local and remote repositories, automatically resolving merge conflicts.
AnnexUnlock unlocks the specified files and directory contents if they are annexed The status channel 'unlockchan' is closed when this function returns.
AnnexWhereis returns information about annexed files in the repository The output channel 'wichan' is closed when this function returns.
BranchSetUpstream sets the default upstream remote for the current branch.
CatFileContents performs a git-cat-file of a specific file from a specific commit and returns the file contents (as bytes).
CatFileType returns the type of a given object at a given revision (blob, tree, or commit).
Checkout performs a git checkout of a specific commit.
Checkwd checks whether the current working directory is in a git repository.
Clone downloads a repository and sets the remote fetch and push urls.
Command sets up an external git command with the provided arguments and returns a GinCmd struct.
Commit records changes that have been added to the repository with a given message.
CommitEmpty performs a commit even when there are no new changes added to the index.
ConfigGet returns the value of a given git configuration key using the default git configuration.
ConfigGetLocal returns the value of a given git configuration key using the local git configuration only.
ConfigSet sets a configuration value in the local git config.
ConfigUnset unsets a configuration value in the local git config.
CopyFile copies the contents of src file into dest file.
DescribeIndex returns a string which describes the git (annex) index.
DescribeIndexShort returns a string which represents a condensed form of the git (annex) index.
DiffUpstream returns, through the provided channel, the names of all files that differ from the default remote branch.
FindRepoRoot returns the absolute path to the root of the repository.
GetAnnexVersion returns the version string of the system's git-annex.
GetGitVersion returns the version string of the system's git binary.
GetHostKey takes a git server configuration, queries the server via SSH, and returns the public key of the host (in the format required for the known_hosts file) and the key fingerprint.
GetKnownHosts returns the path to the known_hosts file.
Init initialises the current directory as a git repository.
IsDirect returns true if the repository in a given path is working in git annex 'direct' mode.
IsVersion6 returns true if the repository in a given path is working in git annex 'direct' mode.
Log returns the commit logs for the repository.
No description provided by the author
LsFiles lists all files known to git.
LsRemote performs a git ls-remote of a specific remote.
LsTree performs a recursive git ls-tree with a given revision (hash) and a list of paths.
MakeKeyPair generates and returns a private-public key pair.
PrivKeyPath returns a map with the full path for all the currently available private key files indexed by the server alias for each key.
Pull downloads all small (git) files from the server.
Push uploads all small (git) files to the server.
RemoteAdd adds a remote named name for the repository at URL.
RemoteRemove removes the remote named name from the repository configuration.
RemoteShow returns the configured remotes and their URL.
RevCount returns the number of commits between two revisions.
RevParse parses an argument and returns the unambiguous, SHA1 representation.
No description provided by the author
SetGitUser sets the user.name and user.email configuration values for the local git repository.
WriteKnownHosts creates a known_hosts file in the config directory with all configured host keys.

# Constants

No description provided by the author
Constant errors.
No description provided by the author

# Variables

RawMode disables --json output for annex commands.

# Structs

AnnexFindRes holds the result of a git annex find invocation for one file.
AnnexInfoRes holds the information returned by AnnexInfo.
AnnexStatusRes for getting the (annex) status of individual files.
AnnexWhereisRes holds the output of a "git annex whereis" command.
No description provided by the author
GinCommit describes a commit, retrieved from the git log.
KeyFile holds the absolute path and filename of the current logged in user's key file.
KeyPair simply holds a private-public key pair as strings, with no extra information.
Object contains the information for a tree or blob object in git.
RepoFileStatus describes the status of files when being added to the repo or transferred to/from remotes.

# Type aliases

No description provided by the author