App-Git-Workflow

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

        Adding new files to tests (Ivan Wills)
        Making message only appear when verbose is set (Ivan Wills)
        Adding new helper command to delete remote branches (Ivan Wills)

1.1.16   2021-10-31
        Updating for release of version 1.1.16
        Fixing the committers output (Ivan Wills)

1.1.15   2021-10-12
        Updating for release of version 1.1.15
        Don't verify when cleaning (Ivan Wills)
        Fixing limit option (Ivan Wills)

1.1.14   2021-02-05
        Updating for release of version 1.1.14
        Updated date (Ivan Wills)
        Allowing branch-age to check brqanches age for specific files (Ivan Wills)
        Fixing bad version number (Ivan Wills)
        Fixing bad version number (Ivan Wills)

1.1.13   2020-09-06

bin/git-hook-setup  view on Meta::CPAN

distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

=cut

__DATA__
__pre-commit__
#!/bin/sh

if git rev-parse --verify HEAD >/dev/null 2>&1
then
    against=HEAD
else
    # Initial commit: diff against an empty tree object
    against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi

# If you want to allow non-ascii filenames set this variable to true.
allownonascii=$(git config hooks.allownonascii)

bin/git-remote-delete  view on Meta::CPAN

   git-remote-delete [option] [remote-name] branch
   git-remote-delete [option] remote-name branch...

 OPTIONS:
  remote-name   The name of the remote to delete from (Default origin)
  branch        The name of the branch (or branches) to delete, if more than
                one branch remote becomes non-optional

  -l --local    Also delete the local branch
  -f --force    Force delete if local branch is out of date
  -n --no-verify
                Don't run git pre-push hooks

  -v --verbose  Show more detailed option
     --version  Prints the version information
     --help     Prints this help information
     --man      Prints the full documentation for git-remote-delete

=head1 DESCRIPTION

Short hand for running

lib/App/Git/Workflow/Command/BranchClean.pm  view on Meta::CPAN

        my ($remote, $name) = $branch =~ m{/} ? split m{/}, $branch, 2 : (undef, $branch);

        if ( $option{tag} ) {
            my $tag = $option{tag_prefix} . $name . $option{tag_suffix};
            $workflow->git->tag(qw/-a -m /, "Converting '$name' to the tag '$tag'", $tag) if !$option{test};
        }

        if ( !$option{test} ) {
            if ($remote) {
                eval {
                    $workflow->git->push($remote, '--no-verify', ":refs/heads/$name");
                    1;
                } or do {
                    return 0;
                }
            }
            else {
                $workflow->git->branch('-D', "$name");
            }
        }

lib/App/Git/Workflow/Command/RemoteDelete.pm  view on Meta::CPAN

our %option = (
    remote   => 'origin',
    branches => [],
);

sub run {
    get_options(
        \%option,
        'local|l',
        'force|f!',
        'no_verify|no-verify|n',
    );

    if (@ARGV > 1 ) {
        ($option{remote}, @{$option{branches}}) = @ARGV;
    }
    else {
        $option{branches}[0] = shift @ARGV;
    }

    for my $branch (@{ $option{branches} }) {
        if ($option{verbose}) {
            warn "git push ".($option{no_verify} ? '--no-verify' : ()). " --delete $option{remote} $branch\n";
        }

        $workflow->git->push(($option{no_verify} ? '--no-verify' : ()), '--delete', $option{remote}, $branch);

        if ( $option{local} ) {
            $workflow->git->branch('-d', ($option{force} ? '-f' : ()), $branch);
        }
    }
}

1;

__DATA__

lib/App/Git/Workflow/Command/RemoteDelete.pm  view on Meta::CPAN


=head1 SYNOPSIS

   git-remote-delete [option] [remote-name]

 OPTIONS:
  remote-name   The name of the remote to delete from (Default origin)

  -l --local    Also delete the local branch
  -f --force    Force delete if local branch is out of date
  -n --no-verify
                Don't run git pre-push hooks

  -v --verbose  Show more detailed option
     --version  Prints the version information
     --help     Prints this help information
     --man      Prints the full documentation for git-remote-delete

=head1 DESCRIPTION

Short hand for running



( run in 0.472 second using v1.01-cache-2.11-cpan-73692580452 )