Raku Land

Git::Add

zef:lizmat

Actions Status

NAME

Git::Add - add paths to a git repository

SYNOPSIS

use Git::Add;

my $status := Git::Add.new(
  :$directory,
  :@add,
);

if $status.added -> @added {
    say "Added:";
    .say for @added;
}

DESCRIPTION

Git::Add provides a simple way to add paths to a git repository.

PARAMETERS

directory

The directory of the git repository. Can be specified as either an IO::Path object, or as a string. Defaults to $*CWD. It should be readable.

add

One or more paths to be added to the repository. Can be specified as strings or as IO::Path objects.

METHODS

added

The paths of files that have been added.

gist

A text representation of the object, empty string if there were no added paths.

AUTHOR

Elizabeth Mattijsen liz@raku.rocks

Source can be located at: https://github.com/lizmat/Git-Add . Comments and Pull Requests are welcome.

COPYRIGHT AND LICENSE

Copyright 2021 Elizabeth Mattijsen

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.