From 1b454cc0cfca72e8d67882fa46f56d8d6d611603 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Thu, 25 Aug 2011 09:24:55 +0200 Subject: [PATCH 01/12] Replace contrib/debian/ with a note on how to install on Debian. Since gitflow is packaged for Debian and is available for testing and sid already, remove the contrib/ directory in favour of using the official Debian package. Also mention how to install gitflow on Debian in the README.mdown. Furthermore, Debian-specific things were removed from Changes.mdown and the Makefile. Signed-off-by: Gergely Nagy --- Changes.mdown | 2 +- Makefile | 7 +------ README.mdown | 10 ++++++++++ contrib/debian/changelog | 5 ----- contrib/debian/compat | 1 - contrib/debian/control | 14 -------------- contrib/debian/copyright | 40 ---------------------------------------- contrib/debian/docs | 1 - contrib/debian/rules | 16 ---------------- 9 files changed, 12 insertions(+), 84 deletions(-) delete mode 100644 contrib/debian/changelog delete mode 100644 contrib/debian/compat delete mode 100644 contrib/debian/control delete mode 100644 contrib/debian/copyright delete mode 100644 contrib/debian/docs delete mode 100755 contrib/debian/rules diff --git a/Changes.mdown b/Changes.mdown index 53858b6b1..f38f90b00 100644 --- a/Changes.mdown +++ b/Changes.mdown @@ -7,7 +7,7 @@ Release date: **not yet** * Various minor bug fixes related to internal argument passing -* Add package installers for the Debian and Windows platforms. +* Add package installers for the Windows platform. 0.4.1: ----- diff --git a/Makefile b/Makefile index 764bd23b0..fbbfd2c00 100644 --- a/Makefile +++ b/Makefile @@ -27,12 +27,7 @@ # policies, either expressed or implied, of Vincent Driessen. # -# Determine if we're inside a debian build .. -ifdef DEB_BUILD_ARCH - prefix=$(DESTDIR)/usr/ -else - prefix=/usr/local -endif +prefix=/usr/local # files that need mode 755 EXEC_FILES=git-flow diff --git a/README.mdown b/README.mdown index b3e1df31b..aa9a6a25f 100644 --- a/README.mdown +++ b/README.mdown @@ -36,6 +36,16 @@ installer, which can be run using the following command: $ wget --no-check-certificate -q -O - https://github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh | sudo bash +#### Debian + +Users of Debian testing and unstable can use the apt-get tool to +install gitflow from the Debian repository: + + $ apt-get install git-flow + +For Debian stable, one can either use the git flow installer, or the +Debian package from unstable (it works just fine on stable too). + ### Windows For Windows users, [msysgit](http://code.google.com/p/msysgit/) is a good diff --git a/contrib/debian/changelog b/contrib/debian/changelog deleted file mode 100644 index f8895965e..000000000 --- a/contrib/debian/changelog +++ /dev/null @@ -1,5 +0,0 @@ -gitflow (0.4.1) unstable; urgency=low - - * Initial Debian Packaging - - -- Kiall Mac Innes Mon, 25 Apr 2011 23:51:42 +0100 diff --git a/contrib/debian/compat b/contrib/debian/compat deleted file mode 100644 index 7f8f011eb..000000000 --- a/contrib/debian/compat +++ /dev/null @@ -1 +0,0 @@ -7 diff --git a/contrib/debian/control b/contrib/debian/control deleted file mode 100644 index d47b2b03d..000000000 --- a/contrib/debian/control +++ /dev/null @@ -1,14 +0,0 @@ -Source: gitflow -Section: vcs -Priority: optional -Maintainer: Kiall Mac Innes -Build-Depends: debhelper (>= 7.0.50~), git -Standards-Version: 3.9.1 -Homepage: http://nvie.com/posts/a-successful-git-branching-model/ -Vcs-Git: https://github.com/nvie/gitflow.git -Vcs-Browser: https://github.com/nvie/gitflow - -Package: gitflow -Architecture: all -Depends: ${shlibs:Depends}, ${misc:Depends}, git -Description: Git extensions to provide high-level repository operations for Vincent Driessen's branching model diff --git a/contrib/debian/copyright b/contrib/debian/copyright deleted file mode 100644 index a08359acb..000000000 --- a/contrib/debian/copyright +++ /dev/null @@ -1,40 +0,0 @@ -Format: http://dep.debian.net/deps/dep5 -Upstream-Name: gitflow -Source: - -Files: * -Copyright: - -License: BSD-3-Clause - -Files: debian/* -Copyright: 2011 Kiall -License: BSD-3-Clause - -License: BSD-3-Clause - 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. - 3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - . - THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - -# Please also look if there are files or directories which have a -# different copyright/license attached and list them here. diff --git a/contrib/debian/docs b/contrib/debian/docs deleted file mode 100644 index ceda507c1..000000000 --- a/contrib/debian/docs +++ /dev/null @@ -1 +0,0 @@ -README.mdown diff --git a/contrib/debian/rules b/contrib/debian/rules deleted file mode 100755 index 79092d6be..000000000 --- a/contrib/debian/rules +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -override_dh_testdir: - dh_testdir - git submodule init && git submodule update -%: - dh $@ From 05c4dbc8a8a8a1a78de12ee0b6ea1d3710fb05bf Mon Sep 17 00:00:00 2001 From: Randy Merrill Date: Thu, 13 Oct 2011 20:28:10 -0700 Subject: [PATCH 02/12] Adding the `eval` to force variable expansion. Closes #50 --- git-flow-release | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-flow-release b/git-flow-release index 08f595b2f..bb39d5276 100644 --- a/git-flow-release +++ b/git-flow-release @@ -239,7 +239,7 @@ cmd_finish() { flag sign && opts="$opts -s" [ "$FLAGS_signingkey" != "" ] && opts="$opts -u '$FLAGS_signingkey'" [ "$FLAGS_message" != "" ] && opts="$opts -m '$FLAGS_message'" - git tag $opts "$tagname" || \ + eval git tag $opts "$tagname" || \ die "Tagging failed. Please run finish again to retry." fi fi From d0df88da6968c39e5c0422a5634060f559081d26 Mon Sep 17 00:00:00 2001 From: Randy Merrill Date: Thu, 13 Oct 2011 21:09:26 -0700 Subject: [PATCH 03/12] Adding the variable expansion to the hotfix. --- git-flow-hotfix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-flow-hotfix b/git-flow-hotfix index 261811317..5c079078c 100644 --- a/git-flow-hotfix +++ b/git-flow-hotfix @@ -241,7 +241,7 @@ cmd_finish() { flag sign && opts="$opts -s" [ "$FLAGS_signingkey" != "" ] && opts="$opts -u '$FLAGS_signingkey'" [ "$FLAGS_message" != "" ] && opts="$opts -m '$FLAGS_message'" - git tag $opts "$VERSION_PREFIX$VERSION" || \ + eval git tag $opts "$VERSION_PREFIX$VERSION" || \ die "Tagging failed. Please run finish again to retry." fi fi From 5a586336158de625ed9bc9541465b5643f9805d5 Mon Sep 17 00:00:00 2001 From: Lorin Hochstein Date: Tue, 20 Dec 2011 10:17:54 -0500 Subject: [PATCH 04/12] Documented init -d flag and publish/pull Documented the -d flag for init command Added docs for feature push and feature pull --- README.mdown | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.mdown b/README.mdown index 70d944d99..dc4e1046f 100644 --- a/README.mdown +++ b/README.mdown @@ -83,13 +83,15 @@ in a Github fork, of course. To initialize a new repo with the basic branch structure, use: - git flow init + 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. + ### Creating feature/release/hotfix/support branches @@ -101,6 +103,11 @@ those questions to accept the (sane) default suggestions. For feature branches, the `` arg must be a commit on `develop`. +* To push/pull a feature branch to the remote repository, use: + + git flow feature publish + git flow feature pull + * To list/start/finish release branches, use: git flow release From 905cfb1e38e39e12eb9070f94914bcb8d9506e00 Mon Sep 17 00:00:00 2001 From: Lorin Hochstein Date: Tue, 20 Dec 2011 10:21:46 -0500 Subject: [PATCH 05/12] whitespace --- README.mdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.mdown b/README.mdown index dc4e1046f..45b896543 100644 --- a/README.mdown +++ b/README.mdown @@ -106,7 +106,7 @@ The ``-d`` flag will accept all defaults. * To push/pull a feature branch to the remote repository, use: git flow feature publish - git flow feature pull + git flow feature pull * To list/start/finish release branches, use: From afbf92c6208184f78b4209cd75679d6e25db70c9 Mon Sep 17 00:00:00 2001 From: Randy Merrill Date: Wed, 8 Feb 2012 09:33:04 -0800 Subject: [PATCH 06/12] Updating the escape characters to fix an issue with having a + in the branch name. Since git allows for it the escape should not escape it since it then won't match the branch names correctly. --- gitflow-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitflow-common b/gitflow-common index fb515de83..4834cf102 100644 --- a/gitflow-common +++ b/gitflow-common @@ -45,7 +45,7 @@ warn() { echo "$@" >&2; } die() { warn "$@"; exit 1; } escape() { - echo "$1" | sed 's/\([\.\+\$\*]\)/\\\1/g' + echo "$1" | sed 's/\([\.\$\*]\)/\\\1/g' } # set logic From 56bff9a830faca63a9d916a43034562b3b34f734 Mon Sep 17 00:00:00 2001 From: Vedang Manerikar Date: Mon, 30 Jan 2012 18:38:46 +0530 Subject: [PATCH 07/12] Added a -r flag to git-flow-feature-pull to support pull with rebase Signed-off-by: Vincent Driessen --- git-flow-feature | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/git-flow-feature b/git-flow-feature index 726b4aed5..d653ec11f 100644 --- a/git-flow-feature +++ b/git-flow-feature @@ -50,7 +50,7 @@ usage() { echo " git flow feature diff []" echo " git flow feature rebase [-i] []" echo " git flow feature checkout []" - echo " git flow feature pull []" + echo " git flow feature pull [-r] []" } cmd_default() { @@ -475,6 +475,7 @@ avoid_accidental_cross_branch_action() { cmd_pull() { #DEFINE_string prefix false 'alternative remote feature branch name prefix' p + DEFINE_boolean rebase false "pull with rebase" r parse_remote_name "$@" if [ -z "$REMOTE" ]; then @@ -500,7 +501,15 @@ cmd_pull() { # we already have a local branch called like this, so simply pull the # remote changes in - git pull -q "$REMOTE" "$BRANCH" || die "Failed to pull from remote '$REMOTE'." + if flag rebase; then + if ! git 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 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 From 7384052ee61b4aa25bad65e20615b9a7502e5998 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Mon, 13 Feb 2012 20:43:12 +0100 Subject: [PATCH 08/12] Fix indenting. --- git-flow-feature | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/git-flow-feature b/git-flow-feature index d653ec11f..e97d67825 100644 --- a/git-flow-feature +++ b/git-flow-feature @@ -475,7 +475,7 @@ avoid_accidental_cross_branch_action() { cmd_pull() { #DEFINE_string prefix false 'alternative remote feature branch name prefix' p - DEFINE_boolean rebase false "pull with rebase" r + DEFINE_boolean rebase false "pull with rebase" r parse_remote_name "$@" if [ -z "$REMOTE" ]; then @@ -501,14 +501,14 @@ cmd_pull() { # we already have a local branch called like this, so simply pull the # remote changes in - if flag rebase; then - if ! git 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 pull -q "$REMOTE" "$BRANCH" || die "Failed to pull from remote '$REMOTE'." - fi + if flag rebase; then + if ! git 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 + it pull -q "$REMOTE" "$BRANCH" || die "Failed to pull from remote '$REMOTE'." + fi echo "Pulled $REMOTE's changes into $BRANCH." else From 53cfc35147096c5d5a43f8570b59a4b5b0aa7cf5 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Mon, 13 Feb 2012 20:48:14 +0100 Subject: [PATCH 09/12] Add Vedang to AUTHORS. --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 1c297540b..f7d1e6638 100644 --- a/AUTHORS +++ b/AUTHORS @@ -18,5 +18,6 @@ Authors are (ordered by first commit date): - Olivier Mengué - Emre Berge Ergenekon - Eric Holmes +- Vedang Manerikar Portions derived from other open source works are clearly marked. From 679f05f4fb52f870b2186eb6f74f7246868f4613 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Mon, 13 Feb 2012 20:53:21 +0100 Subject: [PATCH 10/12] Remove the "still maintained" banner. This is done in anticipation of their discontinuing service. --- README.mdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.mdown b/README.mdown index 45b896543..c7238e6f0 100644 --- a/README.mdown +++ b/README.mdown @@ -1,5 +1,6 @@ -git-flow ![Project status](http://stillmaintained.com/nvie/gitflow.png) +git-flow ======== + 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"). From f60828188567304a920197bae17d3246c8359ed2 Mon Sep 17 00:00:00 2001 From: Ben Loveridge Date: Fri, 6 Jan 2012 11:04:46 -0700 Subject: [PATCH 11/12] set EXPR_COMPAT=1 if running inside freebsd so shFlags works correctly Signed-off-by: Vincent Driessen --- git-flow | 3 +++ 1 file changed, 3 insertions(+) diff --git a/git-flow b/git-flow index a03ba1fd3..93e9f0f73 100755 --- a/git-flow +++ b/git-flow @@ -37,6 +37,9 @@ # policies, either expressed or implied, of Vincent Driessen. # +# set this to workaround expr problems in shFlags on freebsd +if uname -s | egrep -iq 'bsd'; then export EXPR_COMPAT=1; fi + # enable debug mode if [ "$DEBUG" = "yes" ]; then set -x From cc5e9a58bc84100df9b9e2f217ef8bb688ccd996 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Mon, 13 Feb 2012 21:20:22 +0100 Subject: [PATCH 12/12] Update the Changelog. --- Changes.mdown | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Changes.mdown b/Changes.mdown index 4e3936971..9f9aa1888 100644 --- a/Changes.mdown +++ b/Changes.mdown @@ -3,14 +3,19 @@ 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) + 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. -* Various minor bug fixes related to internal argument passing +* `git flow feature pull` now has a `-r` flag, to support `pull --rebase` + semantics (thanks Vedang Manerikar). -* Better support for Windows users. +* Various minor bug fixes related to internal argument passing. + +* Improved some documentation. + +* Better support for Windows and BSD users. * Add package installers for the Debian and Windows platforms.