In particular, this fixes the case where a dot in a version name (not too uncommon ;)) unintentionally matches a pre-existing tag. For example, if these tags exist: 1.0.1 1.0b2 And you try to start a new release for 1.0.2, git-flow prevented it, since the '.' matches the 'b' in 1.0b2. This resulted in the invalid error message: Tag '1.0.2' already exists. Pick another name.
This patch was originally contributed as a workaround for the cases where there were flags that took the first argument position. This fix was just plain wrong and this commit reverts it.
On some systems, /bin/sh is a symlink to dash. "local" here wants to create variables for multiple words on the line. Added quotes so that these are not treated as multiple variables.
This implementation does not rely on Bash-specific functionality.
…ific functions, then gitflow-specific functions and finally, assertions to use in gitflow subcommands.
git specific and git-flow specific functions: gitflow_current_branch -> git_current_branch gitflow_is_branch_merged_into -> git_is_branch_merged_into gitflow_local_branch_exists -> git_local_branch_exists gitflow_local_branches -> git_local_branches gitflow_remote_branches -> git_remote_branches gitflow_require_branch -> require_branch gitflow_require_branch_absent -> require_branch_absent gitflow_require_branches_equal -> require_branches_equal gitflow_require_clean_working_tree -> require_clean_working_tree gitflow_require_git_repo -> require_git_repo gitflow_require_git_repo -> require_git_repo gitflow_require_initialized -> require_gitflow_initialized gitflow_require_initialized -> require_gitflow_initialized gitflow_require_local_branch -> require_local_branch gitflow_require_remote_branch -> require_remote_branch gitflow_require_tag_absent -> require_tag_absent gitflow_tag_exists -> git_tag_exists gitflow_test_branches_equal -> git_compare_branches gitflow_test_clean_working_tree -> git_is_clean_working_tree resolve_nameprefix -> gitflow_resolve_nameprefix
…s. In that case, don't check if the working tree is clean (this yields errors in HEADless repos). This fix enabled users to use "git init && git flow init", too.
variables are all set (they need to be set explicitly once).
…po is fully initialized for use with gitflow. Add a means of only asking for the missing gitflow definitions, not all. (Of course, redefining all is always possible using the -f (--force) flag of init.)
environment/branches. Added test for existence of local branches.
…ranch -a" returns remote branches with a "remotes/" prefix. "git branch -r" still returns branch names we are used to.
…es if the variable is set explicitly by gitflow.
…y what branches should be used for master and develop and then initializes the Git repo itself and/or the git-flow branches for him or her.
…ectly from git branch. Added gitflow_branch_exists() function for testing existence. Let gitflow_test_branches_equal() return with exit code 4 in case of the two branches having no common ancestor.
…sumed existence of a valid git repo. Instead, functions gitflow_load_settings() and gitflow_require_git_repo() have been added that can be called in each submodule that requires such. Specifically, git-flow init does NOT use this.
them live using git commands instead. This avoids git commands being issued by subcommands that do not necessarily require an existing Git repo to be initialized (i.e. git-flow init).
https://wiki.ubuntu.com/DashAsBinSh Went back from making use of the specific Bourne shell construct 'typeset -i' for easy integer calculations (typeset -i foo=123; foo=foo+456;) to a more compatible way (local foo=123; foo=$((foo+456)); ) The 'typeset -f' call has been replaced by a call to 'type', effectively not testing for existence of a declared *function*, but testing for existence of a declared *something*. You have to sacrifice sometimes in order to be more portable.
release/hotfix branch fails finishing, the user may just try so again.
Require branch and tag to be absent when start is run (for release/hotfix) Require branch to exist when trying to finish (for release/hotfix) Die the finish script when either the fetch, checkout or tagging fails.
- Move resolve_name_by_prefix() from git-flow-feature to gitflow-common - Rename require_name() to require_name_arg() - Refactor expanding of nameprefixes
- Lower-cased all local variable names - Explicitly typeset all local variable names, to prevent issues with setting/overriding variables in the global namespace. - Explicitly typed integer types as integer (typeset -i) to enable simpler arithmetic calculations on them.
Renamed shFlags.sh -> gitflow-shFlags