Coder Social home page Coder Social logo

perl6-git-log's Introduction

NAME

Git::Log

AUTHOR

Samantha McVey (samcv) [email protected]

SYNOPSIS

Gets the git log as a Perl 6 object

DESCRIPTION

The first argument is the command line args wanted to be passed into git log. Optionally you can also get the files changes as well as the number of lines added or deleted.

Returns an array of hashes in the following format: ID => "df0c229ad6ba293c67724379bcd3d55af6ea47a0", AuthorName => "Author's Name", AuthorEmail => "[email protected]" ... If the option :get-changes is used (off by default) it will also add a 'changes' key in the following format: changes => { $[ { filename => 'myfile.txt', added => 10, deleted => 5 }, ... ] }

If there is a field that you need that is not offered, then you can supply an array, :@fields. Format is an array of pairs: ID => '%H', AuthorName => '%an' ... you can look for more here.

These are the default fields:

my @fields-default =
    'ID'           => '%H',
    'AuthorName'   => '%an',
    'AuthorEmail'  => '%ae',
    'AuthorDate'   => '%aI',
    'Subject'      => '%s',
    'Body'         => '%b'
;

EXAMPLES

# Gets the git log for the specified repository, from versions 2018.06 to master
git-log(:path($path.IO), '2018.06..master')
# Gets the git log for the current directory, and does I<not> get the files
# changed in that commit
git-log(:!get-changes)

LICENSE

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

sub git-log

sub git-log(
    *@args,
    :@fields = { ... },
    IO::Path :$path,
    Bool:D :$get-changes = Bool::False,
    Bool:D :$date-time = Bool::False
) returns Mu

git-log's first argument is an array that is passed to C and optionally you can provide a path so a directory other than the current are used.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.