Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: a67fa01f97
Fetching contributors…

Cannot retrieve contributors at this time

executable file 51 lines (41 sloc) 1.501 kb
#!/usr/bin/env perl
use Modern::Perl;
my ($action, $name) = @ARGV;
if (not $action) {
say "action needed";
exit;
}
if (not $name) {
say "name needed";
exit;
}
given ($action) {
# May branch off from: devel
# Must merge back into: devel
# Branch naming convention: anything except master, devel, release-*, or
# hotfix-*
#
# Feature branches (or sometimes called topic branches) are used to develop new
# features for the upcoming or a distant future release. When starting
# development of a feature, the target release in which this feature will be
# incorporated may well be unknown at that point. The essence of a feature
# branch is that it exists as long as the feature is in development, but will
# eventually be merged back into devel (to definitely add the new feature to
# the upcoming release) or discarded (in case of a disappointing experiment).
#
# Feature branches typically exist in developer repos only, not in origin.
when ('new-feature') {
if ($name =~ /^(master|devel|release-.*|hotfix-.*)$/ms) {
say "invalid feature name: '$1'";
exit 1;
}
if (system("git checkout -b $name devel") != 0) {
say "ERROR: unable to branch from devel";
exit 2;
}
say "opened feature '$name', run 'gitwiz close-feature $name' when done"
}
default {
say "No such action: '$action'";
}
}
Jump to Line
Something went wrong with that request. Please try again.