NAME
Git::Flux::Utils - Common utility functions for Gitflux
DESCRIPTION
This provides a few command utilities that is shared between Gitflux commands.
SUBROUTINES/METHODS
git_local_branches
Return list of all local git branches.
git_remote_branches
Return list of all remote git branches.
git_all_branches
Return list of all git branches, both local and remote.
git_all_tags
Return list of all git tags.
git_current_branch
Return the current git branch.
git_is_clean_working_tree
Return a numbered code representing the cleanliness of the Git repository.
- 0
-
The repo is clean.
- 1
-
Unclean working directory. This means stuff is waiting to be added to the staging area / index.
- 2
-
Unclean index. This means stuff needs to be committed.
git_repo_is_headless
Returns a boolean on whether the Git repo is headless or not.
git_local_branch_exists($name)
Returns a boolean on whether a certain local branch exists.
git_branch_exists($name)
Returns a boolean on whether a Git branch exists.
git_tag_exists($name)
Returns a boolean on whether a Git tag exists.
git_compare_branches($branch1, $branch2)
Compared two git branches and checks whether their origin coutnerparts have diverged and need merging first. Returns a numbered code:
- 0
-
Branch heads point to the same commit
- 1
-
First given branch needs fast-forwarding
- 2
-
Second given branch needs fast-forwarding
- 3
-
Branch needs a real merge
- 4
-
There is no merge base, i.e. the branches have no common ancestors
git_is_branch_merged_into($branch1, $branch2)
Checks whether branch 1 is succesfully merged into 2.
gitflux_has_master_configured
Return a boolean on whether the gitflux master is configured.
gitflux_has_devel_configured
Returns a boolean on whether the gitflux devel is configured.
gitflux_has_prefixes_configured
Returns a boolean on whether the gitflux prefixes are configured.
gitflux_is_initialized
Returns a boolean on whether gitflux itself is configured.
gitflux_load_settings
Loads all the gitflux settings.
gitflux_resolve_nameprefix
Returns a boolean on whether the gitflux devel is configured.
require_git_repo
Asserts a certain directory is a git repository.
require_gitflux_initialized
Asserts gitflux was already initialized.
require_clean_working_tree
Asserts the working tree is clean.
require_local_branch($branch)
Asserts there's a local branch with a given name.
require_remote_branch($branch)
Asserts there's a local branch with a given name.
require_branch($branch)
Asserts a certain branch exists.
require_branch_absent($name)
Returns a boolean on whether a branch exists.
require_tag_absent($branch)
Asserts that a certain tag is absent.
require_branches_equal($branch1, $branch2)
Asserts that two branches are equal.
is_interactive
Returns boolean on whether we're in interactive mode.
AUTHORS
Sawyer X, <xsawyerx at cpan.org>
Philippe Bruhat (BooK), <book at cpan.org>
BUGS
Please use the Github Issues tracker.
ACKNOWLEDGEMENTS
c<gitflow>
LICENSE AND COPYRIGHT
Copyright 2010 Sawyer X.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
6 POD Errors
The following errors were encountered while parsing the POD:
- Around line 390:
Expected text after =item, not a number
- Around line 395:
Expected text after =item, not a number
- Around line 428:
Expected text after =item, not a number
- Around line 432:
Expected text after =item, not a number
- Around line 436:
Expected text after =item, not a number
- Around line 440:
Expected text after =item, not a number