pax_global_header00006660000000000000000000000064131077132360014515gustar00rootroot0000000000000052 comment=3e05e2a446586f621eaa5e3ccf647a3ba8e120b1 gitflow-avh-1.11.0/000077500000000000000000000000001310771323600140245ustar00rootroot00000000000000gitflow-avh-1.11.0/.editorconfig000066400000000000000000000005301310771323600164770ustar00rootroot00000000000000# This is the top-most .editorconfig file; do not search in parent directories. root = true [*] end_of_line = LF insert_final_newline = true trim_trailing_whitespace = true [Changes.mdown] indent_style = space indent_size = 2 [*.mdown] trim_trailing_whitespace = false [{Makefile, makefile, GNUmakefile}] indent_style = tab indent_size = 4 gitflow-avh-1.11.0/.mailmap000066400000000000000000000006441310771323600154510ustar00rootroot00000000000000# # This list is used by git-shortlog to fix a few botched names in the # git-flow repo, either because the author's full name was messed up and/or # not always written the same way, making contributions from the same person # appearing not to be so. # Eric Holmes Eric J. Holmes Stefan Näwe Stefan Näwe gitflow-avh-1.11.0/AUTHORS000066400000000000000000000024531310771323600151000ustar00rootroot00000000000000git-flow AVH Authors This software consists of voluntary contributions made by many individuals. For exact contribution history, see the revision history and logs, available at http://github.com/petervanderdoes/gitflow. Peter van der Does Vincent Driessen Daniel Dehennin Benedikt Böhm Leonid Komarovsky Felipe Talavera Randy Merrill Kevin Woo Daniel Truemper Eric J. Holmes Fred Condo Alexandre Dutra Ben Loveridge Florian Gamböck Gergely Nagy JP Toto Kiall Mac Innes Lorin Hochstein Olivier Mengué Stefan Näwe Adam Gibbins Alexander Groß Alexander Norström Alexander Zeitler Brian St. Pierre Cararus Eugeniu Chad Walker Craig Fowler Emre Berge Ergenekon Gregor A. Cieslak Gruen Christian-Rolf (Kiki) Guillaume-Jean Herbiet James Moran Jannis Leidel Jason L. Shiffer Jean Jordaan Jelte Fennema Joe Ebmeier John Sivak Jon Bernard Joseph A. Levin Joshua P. Tilles Juan Rial Justin Penney Konstantin Tjuterev Kridsada Thanabulpong Leonardo Giordani Mark Borcherding Mark Derricutt Mateusz Kaczmarek Matias Hernan Lauriti Nowell Strite Opher Vishnia Peter Schröder Stefan Schüßler Steffen Jaeckel Steve Streeting Tacit Sawk Vedang Manerikar eddie cianci gmallard raybec Portions of the project are derived from other open source works are clearly marked. This file is auto generated, any changes will be lost. gitflow-avh-1.11.0/CHANGELOG.md000066400000000000000000000504011310771323600156350ustar00rootroot00000000000000[petervanderdoes]: https://github.com/petervanderdoes "Peter van der Does on github" [adutra]: https://github.com/adutra [aleno]: https://github.com/aleno [algernon]: https://github.com/algernon [asheiduk]: https://github.com/asheiduk [baby-gnu]: https://github.com/baby-gnu [bloomonkey]: https://github.com/bloomonkey [bloveridge]: https://github.com/bloveridge "Ben Loveridge on github" [craigfowler]: https://github.com/craigfowler [cyberbob]: https://github.com/cyberbob [floga]: https://github.com/FloGa [gvangool]: https://github.com/gvangool [havvg]: https://github.com/havvg [jebmeier]: https://github.com/jebmeier [jeromebaum]: https://github.com/jeromebaum [jpenney78]: https://github.com/jpenney78 [jsivak]: https://github.com/jsivak [kperi]: https://github.com/kperi [mallamanis]: https://github.com/mallamanis [memleak]: https://github.com/memleak/ [merelyapseudonym]: https://github.com/MerelyAPseudonym [mykehsd]: https://github.com/mykehsd [OpherV]: https://github.com/OpherV [pcragone]: https://github.com/pcragone [shpoont]: https://github.com/shpoont [shpoont]: https://github.com/shpoont [sinbad]: https://github.com/sinbad [sirn]: https://github.com/sirn # Changelog #### 1.11.0 [Peter van der Does][petervanderdoes] * Bugfix: Problems when using fetch.prune * Bugfix: Errors when initializing git flow and useconfigonly is set but the name and/or email has not been set. * Bugfix: Report summary on finish is incorrect. * Missing push on bugfix finish * Allow a dirty tree when starting a hotfix/support/release branch if set to do so. If the config `gitflow.allowdirty` is set to `true`, allow starting from a dirty tree. * Bugfix: Error when trying to delete a non-existent remote branch * Feature: Add rename command to bugfix/hotfix/feature [Andreas Heiduk][asheiduk] * git flow * rebase now supports rebase.autoStash flag git rebase can automatically cleanup the working tree. Therefore skip the test when and where appropriate. #### 1.10.2 [Peter van der Does][petervanderdoes] * Bugfix: Error finishing a release. #### 1.10.1 [Peter van der Does][petervanderdoes] * Bugfix: flag short name (p) already defined #### 1.10.0 [Peter van der Does][petervanderdoes] * Update github links. * Add explanation of AVH. * Add ability when finishing a release to push or not push the branches and/or tag involved. * The finishing of a release branch based on a branch other than develop fails with errors. * Add --push flag for feature finish. This gives the ability to push the base branch after the finish. * When finishing a release have the ability to fast-forward the master branch, if possible. This is controlled by the flag --ff-master. * Add new flag -T, --tagname to override the tag name when finishing a release or hotfix. * Allow multiple hotfix branches by setting the config allowmultihotfix to true. The command to set it is [Kridsada Thanabulpong][sirn] * Fix infinite loop during Darwin link resolving. [Justin Penney][jpenney78] * Add detection for BusyBox getopt. #### 1.9.1 [Peter van der Does][petervanderdoes] * Bugfix: git-flow directories are not set correctly #### 1.9.0 [Peter van der Does][petervanderdoes] * Add bugfix command. * Repositories with spaces in path cause the pre * post hook to fail. * Error using git flow log. * Using defaults with init fails with existing repository. * Allow multiple hotfix branches. By setting the config gitflow.multi-hotfix to true, you can have multiple hotfix branches. Example: git config --set gitflow.multi-hotfix true * Can't delete branch if the base branch is not the develop branch. * Add squash and squash-info flag to hotfix finish. * Problem when the repository directory has multiple spaces. [Gergely Nagy][algernon] * Remove bash code. [Joe Ebmeier][jebmeier] * Fix issue in case CDPATH is being used. In the case of CDPATH being used, it is possible DOT_GIT_DIR variable is incorrect. [Alexander Norström][aleno] * Fix issue when a prefix is chosen that doesn't end in a slash #### 1.8.0 [Peter van der Does][petervanderdoes] * Add rebase action to release, hotfix and support. * Shortcut for rebase commands. Introduce the following new command: * git flow rebase This command will perform the action on the branch that's currently active. * Use the base branch when doing a git flow feature diff. When doing a diff on the feature branch use the base branch which this feature originated from. It will show the committed changes. * Problem when certain variables are set before executing git-flow. When certain variables are set in the shell environment it causes problems. * Warning for commands to be deprecated. The command "feature checkout/co" will be deprecated per version 2.0.0 The command "feature pull" will be deprecated per version 2.0.0 * Using fetch flag fails sometimes. * Hooks and filters are not executed when you are in a subdirectory of the repository and the hooks directory is set to the suggested value during initialization. [Craig Fowler][craigfowler] * 'export' fails in 'gitflow_load_settings()' [Toni Uebernickel][havvg] * Add log command #### 1.7.0 [Peter van der Does][petervanderdoes] * Refactor the gitflow override flag functions. * Shortcut for finish, delete, and publish commands. Introduce the following new commands: * git flow finish * git flow delete * git flow publish These commands will perform the action on the branch that's currently active. * No branch is needed for the following function: * git flow feature publish/finish/delete * git flow release publish/finish/delete * git flow hotfix publish/finish/delete * Remove base configuration when deleting a feature/hotfix/release branch. * Help text for certain commands is wrong. * Bugfix: Invalid function call. * Bugfix: No make installer fails * Support branches are no longer marked as experimental. [John Sivak][jsivak] * Fix sanity check for release track command. [Opher Vishnia][OpherV] * Fix feature pull. The pull request fails when there's no local branch with the same name as the remote branch. [Leonid Komarovsky][shpoont] * Option for global hooks and filters directory. This is only for hooks and filters related to git-flow, not the standard git hooks. #### 1.6.1 [Peter van der Does][petervanderdoes] * Migration of gitflow_config fails for posix sh. * Error messages when .gitflow_export doesn't exists. #### 1.6.0 [Peter van der Does][petervanderdoes] * Add ability to short-circuit the version filters. An exit of 127 will short-circuit the process. * Output when finishing a branch is wrong. [Mateusz Kaczmarek][cyberbob] * Fix sanity check for feature track command. [Leonid Komarovsky][shpoont] * Move configuration from ~/.gitflow_export to default git config. * Move base configuration from it's own configuration file to the default local git config file. * Improve formatting of the help. #### 1.5.3 [Peter van der Does][petervanderdoes] * Bugfix: Error about deleting branch when using squash option. When using the squash option for release/feature finish, the release/feature branch is not deleted. #### 1.5.2 [Peter van der Does][petervanderdoes] * Add filter for tag message . If a tag message is given, the message can be modified using the filters: - filter-flow-hotfix-finish-tag-message - filter-flow-release-finish-tag-message - filter-flow-release-branch-tag-message * Bugfix: Typo in documentation. [Florian Gamböck][floga] * Bugfix: Fix variable name in hotfix [Leonid Komarovsky][shpoont] * git flow rebase will rebase against its base branch instead of develop. * Add flag --preserve-merges for feature rebase or feature finish. #### 1.5.1 [Peter van der Does][petervanderdoes] * Fix some of the flag override environment variable names. [Joshua P. Tilles][merelyapseudonym] * Add default flag for flag showcommands. [Florian Gamböck][floga] * Bugfix: Fix variable non-zero test Due to missing quotation marks, the -n test won't work properly, leading to always returning true and overriding variables with nothing. #### 1.5.0 [Peter van der Does][petervanderdoes] * Add the ability to set defaults for flag. You can now set defaults for flags by setting environment variables. * Add flag no-ff to feature finish. This gives the ability to never fast-forward a merge, even when it's only one commit. * Bugfix: Error in a long flag name for release finish * Function in gitflow-shFlags refactored to make it faster. * Add flag --squash-info to release/feature finish. When you use the flag --squash while finishing a release or feature branch, the logs don't make it clear which branch you merged. The new flag will add an extra comment to the commit message, stating which branch was used for the merge. * Bugfix: The contrib gitflow-installer.sh shows wrong installation instructions. #### 1.4.2 * Bugfix: Update from upstream for shFlags #### 1.4.1 * Bugfix: Missed quotation mark #### 1.4.0 [Peter van der Does][petervanderdoes] * Remember the base. With the commands feature/hotfix/release start you can give a base from which the new branch will be created. Upon finishing this branch it will automatically merge the branch back into the base as given during the start. If no base is given the normal functionality will be followed. With the hotfix and release, if a base is given and it's not the DEVELOP_BRANCH, the branch will *NOT* be merged back into the $DEVELOP_BRANCH upon finishing this branch. * New config command. git flow config base. This can be used to set and get the base for feature/hotfix/release branches so it can be used when finishing these branches. * Get the correct working directory when the git-flow file is a symbolic link. * Don't check/compare hotfix and base branch when branch is merged already. * Remove export POSIXLY_CORRECT. Setting this environment variable can mess things up when git-flow is used in combination with other shell scripts. * Update gitflow-shFlags from upstream. Besides other improvements this update eliminates the use of external system calls on a majority of systems which in theory leads to a speed increase of about 20%. * Use GNU getopt on BSD systems. BSD getopt doesn't support long options in commands but the GNU getopt does. [Alexandre Dutra][adutra] * Git refuses to delete local branch with "-d" if it is tracking a remote one. * Can't always delete current release/hotfix local branch on finish Situation can occur you are on the local branch the script wants to delete, if you are you can't delete that branch. We'll switch to the base branch when you are deleting the branch you currently are on. #### 1.3.1 * Bugix: git flow config list results in error. #### 1.3.0 [Peter van der Does][petervanderdoes] * Make name in feature publish optional. Instead of always having to add the branch when doing a git flow feature publish, the name should be optional. When a name isn't given, the current branch, if it's a feature branch, will be published. * Add option to select configuration file usage As with the regular git config, git flow init now has the option --file, --global, --system and --local. --local is default. * Add a new command. New command git flow config is added. With this command you can see your current git flow configuration and you can also set the options. * Environment settings for git-flow only. With git you can set environment variables to change behavior, like GIT_MERGE_AUTOEDIT for example. You can add these exports to the file ~/.gitflow_export if you only want to set the environment variable for git-flow. * Bugfix: Missing command hotfix track. The command git flow hotfix track is not implemented. #### 1.2.1 [Peter van der Does][petervanderdoes] * Bugfix: The --showcommands was on by default. It should be off by default. #### 1.2.0 [Peter van der Does][petervanderdoes] * Improve the help output of the commands. * Fix problem with init function on BSD systems. * Add initialize function to git flow version. * Add parameter --showcommands to all commands. This will show the git commands performed while executing the command. Thanks to [Jerome Baum][jeromebaum] for the original implementation. [Daniel Dehennin][baby-gnu] * Display where user is on finish. Some commands did not display the branch you are on after the command finished. * When finishing a hotfix/release and it's to be tagged, the tag must not exist. #### 1.1.0 [Peter van der Does][petervanderdoes] * Bugfix: feature finish does double merge when using squash option. * Add the ability to keep/delete local/remote branches on finish. When finishing a release/hotfix/feature you now can keep/delete the local/remote release/hotfix/feature branch. * New command: git flow release branch With this command you can directly release a given branch. There is no need to start a new release and finish it. You can not use this command on the git-flow branches feature/hotfix/release/support. * Do not display object fetch summary if flag was not set. Thanks to [Daniel Dehennin][baby-gnu]. * Bugfix: Checking if branch exists will fail for remote branches. * Make die output consistent for each die case. * Bugfix: When running git flow init an error message pops up. * Show correct help for subactions. When requesting help with -h for the subactions, the help would show the incorrect command line. * Support reading the tag message from a file in release/hotfix finish. Add the option -f,--messagefile to release and hotfix finish. Thanks to [Steve Streeting][sinbad] for the original coding. * Bugfix: git_current_branch fails for git prior 1.7.10. git symbolic-ref does not have the --short option prior to version 1.7.10. Bug found by [Daniel Dehennin][baby-gnu]. * Clean up code. Remove all porcelain commands. Refactor code. * Improve the back-merge functionality. Adds an command line option (-b), which the user can utilize if the user doesn't want to back-merge but rather merge the release branch into develop. * Add the sub-action delete to sub-commands feature, release and hotfix. The sub-commands feature, release and hotfix now have a new sub-action, delete. With that action you can delete the branches, locally and remote. The action has two options, -f and -r. With -f you can force the deletion, even when the to be deleted branch was not merged yet. With -r the remote branch will also be deleted. [Daniel Dehennin][baby-gnu] * Bugfix: release/feature/hotfix start -F fails. Usage of positional parameters requires to eval ${FLAGS_ARGV}. The "eval set" in function call does not propagate to the caller. * Accept tags as base for hotfix/release/support start. Commit pointed by tags are reachable with ^0\[1\]. * Check for parameter existence for branch and tag existence helpers. * Do not finish hotfixes if they have no commits. A hotfix branch must have some commits and be ahead of master. * Bugfix: When running git flow version an error message pops up. * Reorder fetch and sanity checks. When a user requests a fetch for git flow {feature|hotfix|support} start, do this before some sanity checks to avoid any conflict in branch names and/or version. * Fix flag test in cmd_delete(). [Myke Hines][mykehsd] * Feature and Release squashing options. This allows a -S option to both feature and releasing finishing actions so that developers can squash commits into one large one. [Peter Ragone][pcragone] * Add init to git-flow-{feature,release,hotfix,support}. Fixes the relatively minor issue where 'git flow subcommand help' gives "Not a gitflow-enabled repo yet". * Special thanks to the following individual: [Gert Van Gool][gvangool] #### 1.0-avh [Peter van der Does][petervanderdoes] * Remove trailing whitespace. * Updated from latest develop branch from nvie. Some features were still missing. * Remove the submodule shFlags. Instead of the submodule we'll just use the file. * When finishing a release or hotfix, use tag for back-merging if available. When a release or hotfix branch is tagged, the tag is never merged into the develop branch, it is preferable to have the tag in the develop branch as well, for use with git describe for example. * Update license info. * Bugfix: Typo when pulling existing feature from remote.Thanks to [John Harrison][bloomonkey], [Miltos][mallamanis], [Kostas][kperi] and [memleak][memleak]. * Wrong variable names in the bare-bones. The wrong variable name is set, this can lead to confusing on what's passed to the script, [Steve Streeting][sinbad] * Fixes the suggested name for the integration branch. When git init -d is executed on a repo with multiple branches, the suggested name for the integration branch could possibly be the same name that was already selected for the production release branch. If no suggested name is determined the suggested name remains empty which leads to all sorts of other problems. #### 0.4.2-avh1 [Peter van der Does][petervanderdoes] * Start of the git flow AVH release. * Adds support for the version filter in the commands `git flow release start` and `git flow hotfix start` * Adds support for hooks in various commands. [Ben Loveridge][bloveridge] * Fix usage of shFlags on FreeBSD #### 0.4.2 Release date: not yet * `git flow init` now detects situations where origin already has gitflow branches set up, and behaves accordingly (thanks Emre Berge Ergenekon). * `git flow feature finish` can now be called without a feature branch name(prefix) argument and will finish the current branch, if on any. * `git flow feature pull` now has a `-r` flag, to support `pull --rebase` semantics (thanks Vedang Manerikar). * Various minor bug fixes related to internal argument passing. * Improved some documentation. * Better support for Windows and BSD users. * Add package installer for the Windows platform. #### 0.4.1 Release date: **2011/02/04** * New option `-d` added to `git flow init`, to initialize with defaults without asking for input interactively. Ideal for creating git-flow enabled repos in custom scripts. * The parsing issues related to git-flow feature's flags are now dealt with on all known platforms. (Fixed #54, #62, #86, #97) * Escape queries for detecting branch/tag names. (Fixed #91) #### 0.4 Release date: **2010/10/18** * The flag parsing issues of git-flow subcommands are solved for most platforms. * `git flow {feature,hotfix,release} finish` now takes a `-k` flag, to keep the branch around after finishing. * `git flow release finish` takes a `-n` flag, to skip tagging. * For consistency, `git flow {release,hotfix}` now, too, have a `publish` and `track` subcommand, just like `feature`. * Various minor fixes. #### 0.3 Release date: **2010/07/22** * New subcommands for `git flow feature`: - **checkout**: For easily checking out features by their short name. Even allows unique prefixes as arguments (see below). - **pull**: This subcommand allows you to painlessly work on a feature branch together with another peer. This is especially valuable for doing peer reviews of other people's code. For more detailed info, see the [commit log][1]. * Easier addressing of branch names by using name prefixes. For example, when using: git flow feature finish fo this automatically finishes the feature branch `foobar` if that's the only feature branch name starting with `fo`. * No force flag anymore for new feature branches `git flow feature start` lost its `-f` (force) flag. You now don't have to be in a clean repo anymore to start a new feature branch. This avoids the manual `git stash`, `git flow feature start`, `git stash pop` cycle. * You can use `git-flow` in stand-alone repo's now. This means it does not assume you have an `origin` repository. (Thanks [Mark][2].) * No commands fetch from `origin` by default anymore. There were some issues related to disabling this flag on some platforms. * Init guesses branch names you may want to use for `develop` and `master`. * Added super-easy installation script. (Thanks [Rick][3].) * Added BSD license. [1]: http://github.com/nvie/gitflow/commit/f68d405cc3a11e9df3671f567658a6ab6ed8e0a1 [2]: http://github.com/talios [3]: http://github.com/rickosborne #####Older versions No change history is recorded for pre-0.3 releases. #### Glossary * RFC: Request For Change. This indicates a new or improved function requested by one or more users. gitflow-avh-1.11.0/LICENSE000066400000000000000000000720361310771323600150410ustar00rootroot00000000000000This software is forked of the original git-flow, see License #2. License #1 is added to reflect the changes made. gitflow-shFlags is released under LGPL, see License #3 ************************************************************ LICENSE #1: Copyright (c) 2012-2015 Peter van der Does All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ************************************************************ LICENSE #2: Copyright 2010 Vincent Driessen. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY VINCENT DRIESSEN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL VINCENT DRIESSEN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of Vincent Driessen. ************************************************************ LICENSE #3: GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is 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. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it!gitflow-avh-1.11.0/Makefile000066400000000000000000000045311310771323600154670ustar00rootroot00000000000000# # Authors: # Copyright 2012-2017 Peter van der Does. All rights reserved. # # Original Author: # Copyright 2010 Vincent Driessen. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # prefix=/usr/local datarootdir=$(prefix)/share docdir=$(datarootdir)/doc/gitflow # files that need mode 755 EXEC_FILES=git-flow # files that need mode 644 SCRIPT_FILES =git-flow-init SCRIPT_FILES+=git-flow-feature SCRIPT_FILES+=git-flow-bugfix SCRIPT_FILES+=git-flow-hotfix SCRIPT_FILES+=git-flow-release SCRIPT_FILES+=git-flow-support SCRIPT_FILES+=git-flow-version SCRIPT_FILES+=git-flow-log SCRIPT_FILES+=git-flow-config SCRIPT_FILES+=gitflow-common SCRIPT_FILES+=gitflow-shFlags # Hook files HOOK_FILES=$(wildcard hooks/*) all: @echo "usage: make install" @echo " make uninstall" install: install -d -m 0755 $(prefix)/bin install -d -m 0755 $(docdir)/hooks install -m 0755 $(EXEC_FILES) $(prefix)/bin install -m 0644 $(SCRIPT_FILES) $(prefix)/bin install -m 0644 $(HOOK_FILES) $(docdir)/hooks uninstall: test -d $(prefix)/bin && \ cd $(prefix)/bin && \ rm -f $(EXEC_FILES) $(SCRIPT_FILES) test -d $(docdir) && \ rm -rf $(docdir) gitflow-avh-1.11.0/README.md000066400000000000000000000177001310771323600153100ustar00rootroot00000000000000# git-flow (AVH Edition) A collection of Git extensions to provide high-level repository operations for Vincent Driessen's [branching model](http://nvie.com/git-model "original blog post"). This fork adds functionality not added to the original branch. ## Getting started For the best introduction to get started with `git flow`, please read Jeff Kreeftmeijer's blog post: [http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/](http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/) Or have a look at one of these screen casts: * [How to use a scalable Git branching model called git-flow](http://buildamodule.com/video/change-management-and-version-control-deploying-releases-features-and-fixes-with-git-how-to-use-a-scalable-git-branching-model-called-gitflow) (by Build a Module) * [A short introduction to git-flow](http://vimeo.com/16018419) (by Mark Derricutt) * [On the path with git-flow](https://vimeo.com/codesherpas/on-the-path-gitflow) (by Dave Bock) A quick cheatsheet was made by Daniel Kummer: [http://danielkummer.github.io/git-flow-cheatsheet/](http://danielkummer.github.io/git-flow-cheatsheet/) ## Installing git-flow See the Wiki for up-to-date [Installation Instructions](https://github.com/petervanderdoes/gitflow-avh/wiki/Installation). ## Integration with your shell For those who use the [Bash](http://www.gnu.org/software/bash/) or [ZSH](http://www.zsh.org) shell, you can use my [fork of git-flow-completion](https://github.com/petervanderdoes/git-flow-completion) which includes several additions for git-flow (AVH Edition), or you can use the original [git-flow-completion](http://github.com/bobthecow/git-flow-completion) project by [bobthecow](http://github.com/bobthecow). Both offer tab-completion for git-flow subcommands and branch names with my fork including tab-completion for the commands not found in the original git-flow. ## FAQ * See the [FAQ](http://github.com/petervanderdoes/gitflow-avh/wiki/FAQ) section of the project Wiki. * Version Numbering Scheme. Starting with version 1.0, the project uses the following scheme: \.\.\\ * AVH is the acronym of "A VirtualHome" ## Please help out This project is under constant development. Feedback and suggestions are very welcome and I encourage you to use the [Issues list](http://github.com/petervanderdoes/gitflow-avh/issues) on Github to provide that feedback. Feel free to fork this repository and to commit your additions. For a list of all contributors, please see the [AUTHORS](AUTHORS) file. Any questions, tips, or general discussion can be posted to the Google group: [http://groups.google.com/group/gitflow-users](http://groups.google.com/group/gitflow-users) This is the original group set up to support the nvie branch, but I am monitoring the list as well for any questions related to my version. When you do post a question on the list please indicate which version you are, using the complete version number. ## Contributing Fork the repository. Then, run: ```shell git clone -b master git@github.com:/gitflow-avh.git cd gitflow-avh ``` The `-b master` switch has to be added since the fork operation automatically clones the `develop` branch of the official gitflow repository and cloning it results in a local repository with just a `develop` branch. If you do not have gitflow installed yet install it by running `make && make install`. After that initialize the local gitflow repository with gitflow itself: ```shell git flow init -d git flow feature start ``` Then, do work and commit your changes. ```shell git flow feature publish ``` When done, open a pull request to your feature branch. ## License terms git-flow is published under the FreeBSD License, see the [LICENSE](LICENSE) file. Although the FreeBSD License does not require you to share any modifications you make to the source code, you are very much encouraged and invited to contribute back your modifications to the community, preferably in a Github fork, of course. ## git flow usage ### Initialization To initialize a new repo with the basic branch structure, use: git flow init [-d] This will then interactively prompt you with some questions on which branches you would like to use as development and production branches, and how you would like your prefixes be named. You may simply press Return on any of those questions to accept the (sane) default suggestions. The ``-d`` flag will accept all defaults. ![Screencast git flow init](http://i.imgur.com/lFQbY5V.gif) ### Creating feature/release/hotfix/support branches * To list/start/finish/delete feature branches, use: git flow feature git flow feature start [] git flow feature finish git flow feature delete For feature branches, the `` arg must be a branch, when omitted it defaults to the develop branch. * To push/pull a feature branch to the remote repository, use: git flow feature publish git flow feature track * To list/start/finish/delete release branches, use: git flow release git flow release start [] git flow release finish git flow release delete For release branches, the `` arg must be a branch, when omitted it defaults to the develop branch. * To list/start/finish/delete hotfix branches, use: git flow hotfix git flow hotfix start [] git flow hotfix finish git flow hotfix delete For hotfix branches, the `` arg must be a branch, when omitted it defaults to the production branch. * To list/start support branches, use: git flow support git flow support start For support branches, the `` arg must be a branch, when omitted it defaults to the production branch. ### Share features with others You can easily publish a feature you are working on. The reason can be to allow other programmers to work on it or to access it from another machine. The publish/track feature of gitflow simplify the creation of a remote branch and its tracking. When you want to publish a feature just use: git flow feature publish or, if you already are into the `feature/` branch, just issue: git flow feature publish Now if you execute `git branch -avv` you will see that your branch `feature/` tracks `[origin/feature/]`. To track the same remote branch in another clone of the same repository use: git flow feature track This will create a local feature `feature/` that tracks the same remote branch as the original one, that is `origin/feature/`. When one developer (depending on your work flow) finishes working on the feature he or she can issue `git flow feature finish ` and this will automatically delete the remote branch. All other developers shall then run: git flow feature delete to get rid of the local feature that tracks a remote branch that no more exist. ### Using Hooks and Filters For a wide variety of commands hooks or filters can be called before and after the command. The files should be placed in .git/hooks In the directory hooks you can find examples of all the hooks available. ## Showing your appreciation Of course, the best way to show your appreciation for the git-flow tool itself remains contributing to the community. If you'd like to show your appreciation in another way, however, consider donating through PayPal: [![PayPal][2]][1] [1]: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=S85FXJ9EBHAF2&lc=US&item_name=gitflow&item_number=gitflow&no_note=0&cn=Add%20special%20instructions%20to%20the%20seller&no_shipping=1&rm=1&return=https%3a%2f%2fgithub%2ecom%2fpetervanderdoes%2fgitflow&cancel_return=https%3a%2f%2fgithub%2ecom%2fpetervanderdoes%2fgitflow¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted [2]: https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif gitflow-avh-1.11.0/contrib/000077500000000000000000000000001310771323600154645ustar00rootroot00000000000000gitflow-avh-1.11.0/contrib/gitflow-installer.sh000066400000000000000000000046231310771323600214730ustar00rootroot00000000000000#!/bin/bash # git-flow make-less installer for *nix systems, by Rick Osborne # Based on the git-flow core Makefile: # http://github.com/petervanderdoes/gitflow-avh/blob/master/Makefile # Licensed under the same restrictions as git-flow: # http://github.com/petervanderdoes/gitflow-avh/blob/develop/LICENSE # Updated for the fork at petervanderdoes usage() { echo "Usage: [environment] gitflow-installer.sh [install|uninstall] [stable|develop]" echo "Environment:" echo " PREFIX=$PREFIX" echo " REPO_HOME=$REPO_HOME" echo " REPO_NAME=$REPO_NAME" exit 1 } # Does this need to be smarter for each host OS? if [ -z "$PREFIX" ] ; then PREFIX="/usr/local" fi if [ -z "$REPO_NAME" ] ; then REPO_NAME="gitflow" fi if [ -z "$REPO_HOME" ] ; then REPO_HOME="https://github.com/petervanderdoes/gitflow-avh.git" fi EXEC_PREFIX="$PREFIX" BINDIR="$EXEC_PREFIX/bin" DATAROOTDIR="$PREFIX/share" DOCDIR="$DATAROOTDIR/doc/gitflow" EXEC_FILES="git-flow" SCRIPT_FILES="git-flow-init git-flow-feature git-flow-bugfix git-flow-hotfix git-flow-release git-flow-support git-flow-version gitflow-common gitflow-shFlags git-flow-config" HOOK_FILES="$REPO_NAME/hooks/*" echo "### git-flow no-make installer ###" case "$1" in uninstall) echo "Uninstalling git-flow from $PREFIX" if [ -d "$BINDIR" ] ; then for script_file in $SCRIPT_FILES $EXEC_FILES ; do echo "rm -vf $BINDIR/$script_file" rm -vf "$BINDIR/$script_file" done rm -rf "$DOCDIR" else echo "The '$BINDIR' directory was not found." fi exit ;; help) usage exit ;; install) if [ -z $2 ]; then usage exit fi echo "Installing git-flow to $BINDIR" if [ -d "$REPO_NAME" -a -d "$REPO_NAME/.git" ] ; then echo "Using existing repo: $REPO_NAME" else echo "Cloning repo from GitHub to $REPO_NAME" git clone "$REPO_HOME" "$REPO_NAME" fi cd "$REPO_NAME" git pull cd "$OLDPWD" case "$2" in stable) cd "$REPO_NAME" git checkout master cd "$OLDPWD" ;; develop) cd "$REPO_NAME" git checkout develop cd "$OLDPWD" ;; *) usage exit ;; esac install -v -d -m 0755 "$PREFIX/bin" install -v -d -m 0755 "$DOCDIR/hooks" for exec_file in $EXEC_FILES ; do install -v -m 0755 "$REPO_NAME/$exec_file" "$BINDIR" done for script_file in $SCRIPT_FILES ; do install -v -m 0644 "$REPO_NAME/$script_file" "$BINDIR" done for hook_file in $HOOK_FILES ; do install -v -m 0644 "$hook_file" "$DOCDIR/hooks" done exit ;; *) usage exit ;; esac gitflow-avh-1.11.0/contrib/msysgit-install.cmd000066400000000000000000000040561310771323600213210ustar00rootroot00000000000000@echo off setlocal if not "%~1"=="" set GIT_HOME=%~f1 if "%GIT_HOME%"=="" call :FindGitHome "git.cmd" if exist "%GIT_HOME%" goto :GitHomeOK echo MsysGit installation directory not found.>&2 echo Try to give the directory name on the command line:>&2 echo %0 "%ProgramFiles%\Git" endlocal exit /B 1 :GitHomeOK set ERR=0 echo Installing gitflow into "%GIT_HOME%"... call :ChkGetopt getopt.exe || set ERR=1 if %ERR%==1 goto :End echo getopt.exe... Found if not exist "%GIT_HOME%\bin\git-flow" goto :Install echo GitFlow is already installed.>&2 set /p mychoice="Do you want to replace it [y/n]" if "%mychoice%"=="y" goto :DeleteOldFiles goto :Abort :DeleteOldFiles echo Deleting old files... for /F %%i in ("%GIT_HOME%\git-flow*" "%GIT_HOME%\gitflow-*") do if exist "%%~fi" del /F /Q "%%~fi" :Install echo Copying files... ::goto :EOF xcopy "%~dp0\..\git-flow" "%GIT_HOME%\bin" /Y /R /F if errorlevel 4 if not errorlevel 5 goto :AccessDenied if errorlevel 1 set ERR=1 xcopy "%~dp0\..\git-flow*" "%GIT_HOME%\bin" /Y /R /F || set ERR=1 xcopy "%~dp0\..\gitflow-*" "%GIT_HOME%\bin" /Y /R /F || set ERR=1 if %ERR%==1 choice /T 30 /C Y /D Y /M "Some unexpected errors happened. Sorry, you'll have to fix them by yourself." :End endlocal & exit /B %ERR% goto :EOF :AccessDenied set ERR=1 echo. echo You should run this script with "Full Administrator" rights:>&2 echo - Right-click with Shift on the script from the Explorer>&2 echo - Select "Run as administrator">&2 choice /T 30 /C YN /D Y /N >nul goto :End :Abort echo Installation canceled.>&2 set ERR=1 goto :End :ChkGetopt :: %1 is getopt.exe if exist "%GIT_HOME%\bin\%1" goto :EOF if exist "%~f$PATH:1" goto :EOF echo %GIT_HOME%\bin\%1 not found.>&2 echo You have to install this file manually. See the GitFlow README. exit /B 1 :FindGitHome setlocal set GIT_CMD_DIR=%~dp$PATH:1 if "%GIT_CMD_DIR%"=="" endlocal & goto :EOF endlocal & set GIT_HOME=%GIT_CMD_DIR:~0,-5% goto :EOF gitflow-avh-1.11.0/git-flow000077500000000000000000000154311310771323600155060ustar00rootroot00000000000000#!/bin/sh # # git-flow -- A collection of Git extensions to provide high-level # repository operations for Vincent Driessen's branching model. # # A blog post presenting this model is found at: # http://blog.avirtualhome.com/development-workflow-using-git/ # # Feel free to contribute to this project at: # http://github.com/petervanderdoes/gitflow # # Authors: # Copyright 2012-2017 Peter van der Does. All rights reserved. # # Original Author: # Copyright 2010 Vincent Driessen. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # # enable debug mode if [ "$DEBUG" = "yes" ]; then set -x fi # Setup the GITFLOW_DIR for different operating systems. # This is mostly to make sure that we get the correct directory when the # git-flow file is a symbolic link case $(uname -s) in Linux) export GITFLOW_DIR=$(dirname "$(readlink -e "$0")") ;; FreeBSD|OpenBSD|NetBSD) export FLAGS_GETOPT_CMD='/usr/local/bin/getopt' export GITFLOW_DIR=$(dirname "$(realpath "$0")") ;; Darwin) PRG="$0" while [ -h "$PRG" ]; do link=$(readlink "$PRG") if expr "$link" : '/.*' > /dev/null; then PRG="$link" else PRG="$(dirname "$PRG")/$link" fi done export GITFLOW_DIR=$(dirname "$PRG") ;; *MINGW*) export GITFLOW_DIR=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") pwd () { builtin pwd -W } ;; *) # The sed expression here replaces all backslashes by forward slashes. # This helps our Windows users, while not bothering our Unix users.) export GITFLOW_DIR=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") ;; esac # Extra environment settings if [ -f ~/.gitflow_export ]; then if grep -E 'GITFLOW_FLAG_(SHOWCOMMANDS|INIT|FEATURE|HOTFIX|RELEASE|SUPPORT)' ~/.gitflow_export > /dev/null; then echo "Using environment variables for \"showcommands\", \"init\", \"feature\", \"hotfix\", \"release\" and \"support\" in ~/.gitflow_export has deprecated, use git config instead." echo "" exit 1; else . ~/.gitflow_export fi fi usage() { echo "usage: git flow " echo echo "Available subcommands are:" echo " init Initialize a new git repo with support for the branching model." echo " feature Manage your feature branches." echo " bugfix Manage your bugfix branches." echo " release Manage your release branches." echo " hotfix Manage your hotfix branches." echo " support Manage your support branches." echo " version Shows version information." echo " config Manage your git-flow configuration." echo " log Show log deviating from base branch." echo echo "Try 'git flow help' for details." } main() { if [ $# -lt 1 ]; then usage exit 1 fi # Use the shFlags project to parse the command line arguments . "$GITFLOW_DIR/gitflow-shFlags" FLAGS_PARENT="git flow" # Load common functionality . "$GITFLOW_DIR/gitflow-common" # allow user to request git action logging DEFINE_boolean 'showcommands' false 'Show actions taken (git commands)' # but if the user prefers that the logging is always on, # use the environmental variables. gitflow_override_flag_boolean 'showcommands' 'showcommands' # Sanity checks SUBCOMMAND="$1"; shift if [ "${SUBCOMMAND}" = "finish" ] || [ "${SUBCOMMAND}" = "delete" ] || [ "${SUBCOMMAND}" = "publish" ] || [ "${SUBCOMMAND}" = "rebase" ]; then _current_branch=$(git_current_branch) if gitflow_is_prefixed_branch "${_current_branch}"; then if startswith "${_current_branch}" $(git config --get gitflow.prefix.feature); then SUBACTION="${SUBCOMMAND}" SUBCOMMAND="feature" _prefix=$(git config --get gitflow.prefix.feature) _short_branch_name=$(echo ${_current_branch#*${_prefix}}) else if startswith "${_current_branch}" $(git config --get gitflow.prefix.bugfix); then SUBACTION="${SUBCOMMAND}" SUBCOMMAND="bugfix" _prefix=$(git config --get gitflow.prefix.bugfix) _short_branch_name=$(echo ${_current_branch#*${_prefix}}) else if startswith "${_current_branch}" $(git config --get gitflow.prefix.hotfix); then SUBACTION="${SUBCOMMAND}" SUBCOMMAND="hotfix" _prefix=$(git config --get gitflow.prefix.hotfix) _short_branch_name=$(echo ${_current_branch#*${_prefix}}) else if startswith "${_current_branch}" $(git config --get gitflow.prefix.release); then SUBACTION="${SUBCOMMAND}" SUBCOMMAND="release" _prefix=$(git config --get gitflow.prefix.release) _short_branch_name=$(echo ${_current_branch#*${_prefix}}) fi fi fi fi fi fi if [ ! -e "$GITFLOW_DIR/git-flow-$SUBCOMMAND" ]; then usage exit 1 fi # Run command . "$GITFLOW_DIR/git-flow-$SUBCOMMAND" FLAGS_PARENT="git flow $SUBCOMMAND" if [ -z "${SUBACTION}" ]; then # If the first argument is a flag, it starts with '-', we interpret this # argument as a flag for the default command. if startswith "$1" "-"; then SUBACTION="default" elif [ -z "$1" ]; then SUBACTION="default" else SUBACTION="$1" shift # Do not allow direct calls to subactions with an underscore. if $(contains "$SUBACTION" "_"); then warn "Unknown subcommand: '$SUBACTION'" usage exit 1 fi # Replace the dash with an underscore as bash doesn't allow a dash # in the function name. SUBACTION=$(echo "$SUBACTION" |tr '-' '_') fi fi if ! type "cmd_$SUBACTION" >/dev/null 2>&1; then warn "Unknown subcommand: '$SUBACTION'" usage exit 1 fi # Run the specified action if [ $SUBACTION != "help" ] && [ $SUBCOMMAND != "init" ]; then initialize fi if [ $SUBACTION != 'default' ]; then FLAGS_PARENT="git flow $SUBCOMMAND $SUBACTION" fi cmd_$SUBACTION "$@" "${_short_branch_name}" } main "$@" gitflow-avh-1.11.0/git-flow-bugfix000066400000000000000000000600341310771323600167640ustar00rootroot00000000000000# $Id$ # vim:et:ft=sh:sts=2:sw=2 # # git-flow -- A collection of Git extensions to provide high-level # repository operations for Vincent Driessen's branching model. # # A blog post presenting this model is found at: # http://blog.avirtualhome.com/development-workflow-using-git/ # # Feel free to contribute to this project at: # http://github.com/petervanderdoes/gitflow # # Authors: # Copyright 2012-2017 Peter van der Does. All rights reserved. # # Original Author: # Copyright 2010 Vincent Driessen. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # initialize() { require_git_repo require_gitflow_initialized git config --get gitflow.prefix.bugfix >/dev/null 2>&1 || die "Bugfix prefix not set. Please run 'git flow init'." gitflow_load_settings PREFIX=$(git config --get gitflow.prefix.bugfix) } usage() { OPTIONS_SPEC="\ git flow bugfix [list] git flow bugfix start git flow bugfix finish git flow bugfix publish git flow bugfix track git flow bugfix diff git flow bugfix rebase git flow bugfix checkout git flow bugfix pull git flow bugfix delete Manage your bugfix branches. For more specific help type the command followed by --help -- " flags_help } cmd_default() { cmd_list "$@" } cmd_list() { OPTIONS_SPEC="\ git flow bugfix [list] [-h] [-v] Lists all the existing bugfix branches in the local repository. -- h,help! Show this help v,verbose Verbose (more) output " local bugfix_branches current_branch width branch len local base develop_sha branch_sha # Define flags DEFINE_boolean 'verbose' false 'verbose (more) output' v # Parse argun=ments parse_args "$@" bugfix_branches=$(git_local_branches_prefixed "$PREFIX") if [ -z "$bugfix_branches" ]; then warn "No bugfix branches exist." warn "" warn "You can start a new bugfix branch:" warn "" warn " git flow bugfix start []" warn "" exit 0 fi current_branch=$(git_current_branch) # Determine column width first width=0 for branch in $bugfix_branches; do len=${#branch} width=$(max $width $len) done width=$(($width+3-${#PREFIX})) for branch in $bugfix_branches; do base=$(git merge-base "$branch" "$DEVELOP_BRANCH") develop_sha=$(git rev-parse "$DEVELOP_BRANCH") branch_sha=$(git rev-parse "$branch") if [ "$branch" = "$current_branch" ]; then printf "* " else printf " " fi if flag verbose; then printf "%-${width}s" "${branch#$PREFIX}" if [ "$branch_sha" = "$develop_sha" ]; then printf "(no commits yet)" elif [ "$base" = "$branch_sha" ]; then printf "(is behind develop, may ff)" elif [ "$base" = "$develop_sha" ]; then printf "(based on latest develop)" else printf "(may be rebased)" fi else printf "%s" "${branch#$PREFIX}" fi echo done } cmd_help() { usage exit 0 } # Parse arguments and set common variables parse_args() { FLAGS "$@" || exit $? eval set -- "${FLAGS_ARGV}" # read arguments into global variables if [ -z $1 ]; then NAME='' else NAME=$1 fi BRANCH=$PREFIX$NAME } parse_remote_name() { # Parse arguments FLAGS "$@" || exit $? eval set -- "${FLAGS_ARGV}" # read arguments into global variables if [ -z $1 ]; then REMOTE='' else REMOTE=$1 fi if [ -z $2 ]; then NAME='' else NAME=$2 fi BRANCH=$PREFIX$NAME } cmd_start() { OPTIONS_SPEC="\ git flow bugfix start [-h] [-F] [] Start new bugfix , optionally basing it on instead of -- h,help! Show this help showcommands! Show git commands while executing them F,[no]fetch Fetch from origin before performing local operation " local base # Define flags DEFINE_boolean 'fetch' false 'fetch from origin before performing local operation' F # Override defaults with values from config gitflow_override_flag_boolean "bugfix.start.fetch" "fetch" # Parse arguments parse_args "$@" eval set -- "${FLAGS_ARGV}" base=${2:-$DEVELOP_BRANCH} require_base_is_local_branch "$base" gitflow_require_name_arg gitflow_config_set_base_branch $base $BRANCH # Update the local repo with remote changes, if asked if flag fetch; then git_fetch_branch "$ORIGIN" "$base" fi # Sanity checks require_branch_absent "$BRANCH" # If the origin branch counterpart exists, assert that the local branch # isn't behind it (to avoid unnecessary rebasing) if git_remote_branch_exists "$ORIGIN/$base"; then require_branches_equal "$base" "$ORIGIN/$base" fi run_pre_hook "$NAME" "$ORIGIN" "$BRANCH" "$base" # create branch git_do checkout -b "$BRANCH" "$base" || die "Could not create bugfix branch '$BRANCH'." run_post_hook "$NAME" "$ORIGIN" "$BRANCH" "$base" echo echo "Summary of actions:" echo "- A new branch '$BRANCH' was created, based on '$base'" echo "- You are now on branch '$(git_current_branch)'" echo "" echo "Now, start committing on your bugfix. When done, use:" echo "" echo " git flow bugfix finish $NAME" echo } cmd_finish() { OPTIONS_SPEC="\ git flow bugfix finish [-h] [-F] [-r] [-p] [-k] [-D] [-S] [--no-ff] Finish bugfix -- h,help! Show this help showcommands! Show git commands while executing them F,[no]fetch Fetch from origin before performing finish r,[no]rebase Rebase before merging p,[no]preserve-merges Preserve merges while rebasing [no]push Push to origin after performing finish k,[no]keep Keep branch after performing finish keepremote! Keep the remote branch keeplocal! Keep the local branch D,[no]force_delete Force delete bugfix branch after finish S,[no]squash Squash bugfix during merge no-ff! Never fast-forward during the merge " local finish_base # Define flags DEFINE_boolean 'fetch' false "fetch from $ORIGIN before performing finish" F DEFINE_boolean 'rebase' false "rebase before merging" r DEFINE_boolean 'preserve-merges' false 'try to recreate merges while rebasing' p DEFINE_boolean 'push' false "push to $ORIGIN after performing finish" DEFINE_boolean 'keep' false "keep branch after performing finish" k DEFINE_boolean 'keepremote' false "keep the remote branch" DEFINE_boolean 'keeplocal' false "keep the local branch" DEFINE_boolean 'force_delete' false "force delete bugfix branch after finish" D DEFINE_boolean 'squash' false "squash bugfix during merge" S DEFINE_boolean 'squash-info' false "add branch info during squash" DEFINE_boolean 'no-ff!' false "Don't fast-forward ever during merge " # Override defaults with values from config gitflow_override_flag_boolean "bugfix.finish.fetch" "fetch" gitflow_override_flag_boolean "bugfix.finish.rebase" "rebase" gitflow_override_flag_boolean "bugfix.finish.preserve-merges" "preserve_merges" gitflow_override_flag_boolean "bugfix.finish.push" "push" gitflow_override_flag_boolean "bugfix.finish.keep" "keep" gitflow_override_flag_boolean "bugfix.finish.keepremote" "keepremote" gitflow_override_flag_boolean "bugfix.finish.keeplocal" "keeplocal" gitflow_override_flag_boolean "bugfix.finish.force-delete" "force_delete" gitflow_override_flag_boolean "bugfix.finish.squash" "squash" gitflow_override_flag_boolean "bugfix.finish.squash-info" "squash_info" gitflow_override_flag_boolean "bugfix.finish.no-ff" "no_ff" # Parse arguments parse_args "$@" # Use current branch if no name is given if [ "$NAME" = "" ]; then gitflow_use_current_branch_name fi # Keeping both branches implies the --keep flag to be true. if flag keepremote && flag keeplocal; then FLAGS_keep=$FLAGS_TRUE fi # Sanity checks require_branch "$BRANCH" BASE_BRANCH=$(gitflow_config_get_base_branch $BRANCH) BASE_BRANCH=${BASE_BRANCH:-$DEVELOP_BRANCH} git_local_branch_exists "$BASE_BRANCH" || die "The base '$BASE_BRANCH' doesn't exists locally or is not a branch. Can't finish the bugfix branch '$BRANCH'." # Detect if we're restoring from a merge conflict if [ -f "$DOT_GIT_DIR/.gitflow/MERGE_BASE" ]; then # # TODO: detect that we're working on the correct branch here! # The user need not necessarily have given the same $NAME twice here # (although he/she should). # # TODO: git_is_clean_working_tree() should provide an alternative # exit code for "unmerged changes in working tree", which we should # actually be testing for here if git_is_clean_working_tree; then finish_base=$(cat "$DOT_GIT_DIR/.gitflow/MERGE_BASE") # Since the working tree is now clean, either the user did a # successful merge manually, or the merge was cancelled. # We detect this using git_is_branch_merged_into() if git_is_branch_merged_into "$BRANCH" "$finish_base"; then rm -f "$DOT_GIT_DIR/.gitflow/MERGE_BASE" helper_finish_cleanup exit 0 else # If the user cancelled the merge and decided to wait until # later,that's fine. But we have to acknowledge this by # removing the MERGE_BASE file and continuing normal execution # of the finish rm -f "$DOT_GIT_DIR/.gitflow/MERGE_BASE" fi else echo echo "Merge conflicts not resolved yet, use:" echo " git mergetool" echo " git commit" echo echo "You can then complete the finish by running it again:" echo " git flow bugfix finish $NAME" echo exit 1 fi fi # Sanity checks require_clean_working_tree # We always fetch the Branch from Origin # This is done to avoid possible commits on the remote that are not # merged into the local branch if git_remote_branch_exists "$ORIGIN/$BRANCH"; then git_fetch_branch "$ORIGIN" "$BRANCH" fi # Update local branches with remote branches if flag fetch; then git_fetch_branch "$ORIGIN" "$BASE_BRANCH" fi # Check if the local branches have all the commits from the remote branches if git_remote_branch_exists "$ORIGIN/$BRANCH"; then require_branches_equal "$BRANCH" "$ORIGIN/$BRANCH" fi if git_remote_branch_exists "$ORIGIN/$BASE_BRANCH"; then require_branches_equal "$BASE_BRANCH" "$ORIGIN/$BASE_BRANCH" fi run_pre_hook "$NAME" "$ORIGIN" "$BRANCH" # If the user wants to rebase, do that first if flag rebase; then local _rebase_opts="" if flag preserve_merges; then _rebase_opts="$_rebase_opts -p" fi if flag showcommands; then _rebase_opts="$_rebase_opts --showcommands" fi if ! git flow bugfix rebase $_rebase_opts "$NAME"; then warn "Finish was aborted due to conflicts during rebase." warn "Please finish the rebase manually now." warn "When finished, re-run:" warn " git flow bugfix finish '$NAME' '$BASE_BRANCH'" exit 1 fi fi # Merge into BASE git_do checkout "$BASE_BRANCH" || die "Could not check out branch '$BASE_BRANCH'." if noflag squash; then if flag no_ff; then git_do merge --no-ff "$BRANCH" else if [ "$(git rev-list -n2 "$BASE_BRANCH..$BRANCH" | wc -l)" -eq 1 ]; then git_do merge --ff "$BRANCH" else git_do merge --no-ff "$BRANCH" fi fi else git_do merge --squash "$BRANCH" flag squash_info && gitflow_create_squash_message "Merged bugfix branch '$BRANCH'" "$BASE_BRANCH" "$BRANCH" > "$DOT_GIT_DIR/SQUASH_MSG" git_do commit fi if [ $? -ne 0 ]; then # Oops.. we have a merge conflict! # Write the given $BASE_BRANCH to a temporary file as we will # be needing it later. mkdir -p "$DOT_GIT_DIR/.gitflow" echo "$BASE_BRANCH" > "$DOT_GIT_DIR/.gitflow/MERGE_BASE" echo echo "There were merge conflicts. To resolve the merge conflict manually, use:" echo " git mergetool" echo " git commit" echo echo "You can then complete the finish by running it again:" echo " git flow bugfix finish $NAME" echo exit 1 fi run_post_hook "$NAME" "$ORIGIN" "$BRANCH" # When no merge conflict is detected, just clean up the bugfix branch gitflow_config_remove_base_branch "$BRANCH" helper_finish_cleanup } helper_finish_cleanup() { local keepmsg remotebranchdeleted localbranchdeleted # Sanity checks require_branch "$BRANCH" require_clean_working_tree remotebranchdeleted=$FLAGS_FALSE localbranchdeleted=$FLAGS_FALSE if noflag keep; then # Always delete remote first if noflag keepremote;then if git_remote_branch_exists "$ORIGIN/$BRANCH"; then git_remote_branch_delete "$BRANCH" && remotebranchdeleted=$FLAGS_TRUE fi fi # Delete local after remote to avoid warnings if noflag keeplocal; then if [ "$BRANCH" = "$(git_current_branch)" ]; then git_do checkout "$BASE_BRANCH" || die "Could not check out branch '$BASE_BRANCH'." fi if flag force_delete; then git_do branch -D "$BRANCH" && localbranchdeleted=$FLAGS_TRUE else if noflag squash; then git_do branch -d "$BRANCH" && localbranchdeleted=$FLAGS_TRUE else git_do branch -D "$BRANCH" && localbranchdeleted=$FLAGS_TRUE fi fi fi # no more branches: we can safely remove config section if ! git_remote_branch_exists "$ORIGIN/$BRANCH" -a ! git_local_branch_exists "$BRANCH"; then gitflow_config_remove_base_section "$BRANCH" fi fi if flag push; then git_do push "$ORIGIN" "$BASE_BRANCH" || die "Could not push branch '$BASE_BRANCH' to remote '$ORIGIN'." fi echo echo "Summary of actions:" echo "- The bugfix branch '$BRANCH' was merged into '$BASE_BRANCH'" #echo "- Merge conflicts were resolved" # TODO: Add this line when it's supported if noflag keep; then if [ $localbranchdeleted -eq $FLAGS_TRUE ]; then keepmsg="has been locally deleted" else keepmsg="is still locally available" fi if [ $remotebranchdeleted -eq $FLAGS_TRUE ]; then keepmsg=$keepmsg"; it has been remotely deleted from '$ORIGIN'" elif git_remote_branch_exists "$ORIGIN/$BRANCH"; then keepmsg=$keepmsg"; it is still remotely available on '$ORIGIN'" fi else keepmsg="is still locally available" if git_remote_branch_exists "$ORIGIN/$BRANCH"; then keepmsg=$keepmsg"; it is still remotely available on '$ORIGIN'" fi fi echo "- bugfix branch '$BRANCH' "$keepmsg echo "- You are now on branch '$(git_current_branch)'" echo } cmd_publish() { OPTIONS_SPEC="\ git flow bugfix publish [-h] [] Publish bugfix branch on $ORIGIN. When is omitted the current branch is used, but only if it's a bugfix branch. -- h,help! Show this help showcommands! Show git commands while executing them " # Parse arguments parse_args "$@" # Use current branch if no name is given if [ "$NAME" = "" ]; then gitflow_use_current_branch_name fi # Sanity checks require_clean_working_tree require_branch "$BRANCH" git_do fetch -q "$ORIGIN" || die "Could not fetch branch '$BRANCH' from remote '$ORIGIN'." require_branch_absent "$ORIGIN/$BRANCH" run_pre_hook "$NAME" "$ORIGIN" "$BRANCH" # Create remote branch with remote tracking git_do push -u "$ORIGIN" "$BRANCH:$BRANCH" git_do fetch -q "$ORIGIN" "$BRANCH" || die "Could not fetch branch '$BRANCH' from remote '$ORIGIN'." git_do checkout "$BRANCH" || die "Could not check out branch '$BRANCH'." run_post_hook "$NAME" "$ORIGIN" "$BRANCH" echo echo "Summary of actions:" echo "- The remote branch '$BRANCH' was created or updated" echo "- The local branch '$BRANCH' was configured to track the remote branch" echo "- You are now on branch '$(git_current_branch)'" echo } cmd_track() { OPTIONS_SPEC="\ git flow bugfix track [-h] Start tracking bugfix that is shared on $ORIGIN -- h,help! Show this help showcommands! Show git commands while executing them " # Parse arguments parse_args "$@" gitflow_require_name_arg # Sanity checks require_clean_working_tree require_local_branch_absent "$BRANCH" run_pre_hook "$NAME" "$ORIGIN" "$BRANCH" git_do fetch -q "$ORIGIN" || die "Could not fetch branch '$BRANCH' from remote '$ORIGIN'." git_remote_branch_exists "$ORIGIN/$BRANCH" # Create tracking branch git_do checkout -b "$BRANCH" "$ORIGIN/$BRANCH" || die "Could not create '$BRANCH'." run_post_hook "$NAME" "$ORIGIN" "$BRANCH" echo echo "Summary of actions:" echo "- A new remote tracking branch '$BRANCH' was created" echo "- You are now on branch '$(git_current_branch)'" echo } cmd_diff() { OPTIONS_SPEC="\ git flow bugfix diff [-h] [] Show all changes in that are not in the base -- h,help! Show this help showcommands! Show git commands while executing them " local base # Parse arguments parse_args "$@" # Use current branch if no name is given if [ "$NAME" = "" ]; then gitflow_use_current_branch_name fi base=$(gitflow_config_get_base_branch $BRANCH) base=${base:-$DEVELOP_BRANCH} git_do diff "$base..$BRANCH" } cmd_checkout() { OPTIONS_SPEC="\ git flow bugfix checkout [-h] [] Switch to bugfix branch -- h,help! Show this help showcommands! Show git commands while executing them " # Parse arguments parse_args "$@" NAME=$(gitflow_resolve_nameprefix "$NAME" "$PREFIX") if [ $? -eq 0 ]; then BRANCH=$PREFIX$NAME git_do checkout "$BRANCH" || die "Could not check out branch '$BRANCH'." fi } cmd_co() { # Alias for checkout cmd_checkout "$@" } cmd_rebase() { OPTIONS_SPEC="\ git flow bugfix rebase [-h] [-i] [-p] [] Rebase on -- h,help! Show this help showcommands! Show git commands while executing them i,[no]interactive Do an interactive rebase p,[no]preserve-merges Preserve merges " local opts # Define flags DEFINE_boolean 'interactive' false 'do an interactive rebase' i DEFINE_boolean 'preserve-merges' false 'try to recreate merges' p # Override defaults with values from config gitflow_override_flag_boolean "bugfix.rebase.interactive" "interactive" gitflow_override_flag_boolean "bugfix.rebase.preserve-merges" "preserve_merges" # Parse arguments parse_args "$@" # Use current branch if no name is given if [ "$NAME" = "" ]; then gitflow_use_current_branch_name fi BASE_BRANCH=$(gitflow_config_get_base_branch $BRANCH) BASE_BRANCH=${BASE_BRANCH:-$DEVELOP_BRANCH} warn "Will try to rebase '$NAME' which is based on '$BASE_BRANCH'..." if ! git_config_bool_exists "rebase.autostash"; then require_clean_working_tree fi require_branch "$BRANCH" git_local_branch_exists "$BASE_BRANCH" || die "The base '$BASE_BRANCH' doesn't exists locally or is not a branch. Can't rebase the bugfix branch '$BRANCH'." git_do checkout -q "$BRANCH" || die "Could not check out branch '$BRANCH'." if flag interactive; then opts="$opts -i" fi if flag preserve_merges; then opts="$opts -p" fi git_do rebase $opts "$BASE_BRANCH" } avoid_accidental_cross_branch_action() { local current_branch current_branch=$(git_current_branch) if [ "$BRANCH" != "$current_branch" ]; then warn "Trying to pull from '$BRANCH' while currently on branch '$current_branch'." warn "To avoid unintended merges, git-flow aborted." return 1 fi return 0 } cmd_pull() { OPTIONS_SPEC="\ git flow bugfix pull [-h] [] Pull bugfix from -- h,help! Show this help showcommands! Show git commands while executing them " local current_branch # Define flags DEFINE_boolean 'rebase' false "pull with rebase" r warn "The command 'git flow bugfix pull' will be deprecated per version 2.0.0. Use 'git flow bugfix track' instead." # Parse arguments parse_remote_name "$@" if [ -z "$REMOTE" ]; then die "Name a remote explicitly." fi # Use current branch if no name is given if [ "$NAME" = "" ]; then gitflow_use_current_branch_name fi # To avoid accidentally merging different bugfix branches into each other, # die if the current bugfix branch differs from the requested $NAME # argument. current_branch=$(git_current_branch) if startswith "$current_branch" "$PREFIX"; then # We are on a local bugfix branch already, so $BRANCH must be equal to # the current branch avoid_accidental_cross_branch_action || die fi require_clean_working_tree run_pre_hook "$NAME" "$REMOTE" "$BRANCH" if git_local_branch_exists "$BRANCH"; then # Again, avoid accidental merges avoid_accidental_cross_branch_action || die # We already have a local branch called like this, so simply pull the # remote changes in if flag rebase; then if ! git_do pull --rebase -q "$REMOTE" "$BRANCH"; then warn "Pull was aborted. There might be conflicts during rebase or '$REMOTE' might be inaccessible." exit 1 fi else git_do pull -q "$REMOTE" "$BRANCH" || die "Failed to pull from remote '$REMOTE'." fi echo "Pulled $REMOTE's changes into $BRANCH." else # Setup the local branch clone for the first time git_do fetch -q "$REMOTE" "$BRANCH" || die "Could not fetch branch '$BRANCH' from remote '$REMOTE'." # Stores in FETCH_HEAD git_do branch --no-track "$BRANCH" FETCH_HEAD || die "Branch failed." git_do checkout -q "$BRANCH" || die "Could not check out branch '$BRANCH'." echo "Created local branch $BRANCH based on $REMOTE's $BRANCH." fi run_post_hook "$NAME" "$REMOTE" "$BRANCH" } cmd_delete() { OPTIONS_SPEC="\ git flow bugfix delete [-h] [-f] [-r] Delete a given bugfix branch -- h,help! Show this help showcommands! Show git commands while executing them f,[no]force Force deletion r,[no]remote Delete remote branch " local current_branch # Define flags DEFINE_boolean 'force' false "force deletion" f DEFINE_boolean 'remote' false "delete remote branch" r # Override defaults with values from config gitflow_override_flag_boolean "bugfix.delete.force" "force" gitflow_override_flag_boolean "bugfix.delete.remote" "remote" # Parse arguments parse_args "$@" gitflow_require_name_arg # Sanity checks require_branch "$BRANCH" BASE_BRANCH=$(gitflow_config_get_base_branch $BRANCH) BASE_BRANCH=${BASE_BRANCH:-$DEVELOP_BRANCH} run_pre_hook "$NAME" "$ORIGIN" "$BRANCH" current_branch=$(git_current_branch) # We can't delete a branch we are on, switch to the develop branch. if [ "$BRANCH" = "$current_branch" ]; then require_clean_working_tree if git_local_branch_exists "$BASE_BRANCH"; then git_do checkout "$BASE_BRANCH" else git_do checkout "$DEVELOP_BRANCH" || die "Could not check out branch '$DEVELOP_BRANCH'." fi fi if git_is_branch_merged_into "$BRANCH" "$BASE_BRANCH"; then git_do branch -d "$BRANCH" || die "Could not delete the $BRANCH." if flag remote; then git_remote_branch_delete "$BRANCH" fi else if flag force; then git_do branch -D "$BRANCH" || die "Could not delete the $BRANCH." if flag remote; then git_remote_branch_delete "$BRANCH" fi else die "bugfix branch '$BRANCH' has been not been merged yet. Use -f to force the deletion." fi fi gitflow_config_remove_base_section "$BRANCH" run_post_hook "$NAME" "$ORIGIN" "$BRANCH" echo echo "Summary of actions:" echo "- bugfix branch '$BRANCH' has been deleted." flag remote && echo "- bugfix branch '$BRANCH' in '$ORIGIN' has been deleted." echo "- You are now on branch '$(git_current_branch)'" echo } cmd_rename() { OPTIONS_SPEC="\ git flow bugfix rename [] Rename a given bugfix branch -- h,help! Show this help showcommands! Show git commands while executing them " gitflow_rename_branch "$@" } gitflow-avh-1.11.0/git-flow-config000066400000000000000000000206531310771323600167500ustar00rootroot00000000000000# $Id$ # vim:et:ft=sh:sts=2:sw=2 # # git-flow -- A collection of Git extensions to provide high-level # repository operations for Vincent Driessen's branching model. # # A blog post presenting this model is found at: # http://blog.avirtualhome.com/development-workflow-using-git/ # # Feel free to contribute to this project at: # http://github.com/petervanderdoes/gitflow # # Authors: # Copyright 2012-2017 Peter van der Does. All rights reserved. # # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # initialize() { require_git_repo require_gitflow_initialized gitflow_load_settings } usage() { OPTIONS_SPEC="\ git flow config [list] git flow config set git flow config base Manage the git-flow configuration. For more specific help type the command followed by --help -- " flags_help } parse_args() { # Parse options FLAGS "$@" || exit $? eval set -- "${FLAGS_ARGV}" OPTION=$(echo $1|tr '[:upper:]' '[:lower:]') if [ "$FLAGS_file" != "" ]; then gitflow_config_option="--file '$FLAGS_file'" elif flag local; then gitflow_config_option="--local" elif flag global; then gitflow_config_option="--global" elif flag system; then gitflow_config_option="--system" else gitflow_config_option="" fi } # Default entry when no SUBACTION is given cmd_default() { cmd_list "$@" } cmd_list() { OPTIONS_SPEC="\ git flow config [list] Show the git-flow configurations -- h,help! Show this help Use config file location local! Use repository config file global! Use global config file system! Use system config file file= Use given config file " local output # Define flags DEFINE_boolean 'local' false 'use repository config file' DEFINE_boolean 'global' false 'use global config file' DEFINE_boolean 'system' false 'use system config file' DEFINE_string 'file' "" 'use given config file' # Parse arguments parse_args "$@" output=$(git config $gitflow_config_option --get gitflow.branch.master) echo "Branch name for production releases: $output " output=$(git config $gitflow_config_option --get gitflow.branch.develop) echo "Branch name for \"next release\" development: $output " output=$(git config $gitflow_config_option --get gitflow.prefix.feature) echo "Feature branch prefix: $output " output=$(git config $gitflow_config_option --get gitflow.prefix.bugfix) echo "Bugfix branch prefix: $output " output=$(git config $gitflow_config_option --get gitflow.prefix.release) echo "Release branch prefix: $output " output=$(git config $gitflow_config_option --get gitflow.prefix.hotfix) echo "Hotfix branch prefix: $output " output=$(git config $gitflow_config_option --get gitflow.prefix.support) echo "Support branch prefix: $output " output=$(git config $gitflow_config_option --get gitflow.prefix.versiontag) echo "Version tag prefix: $output " } cmd_set() { OPTIONS_SPEC="\ git flow config set