From 69f146288533a2fa9ad407e30da786412ef2fceb Mon Sep 17 00:00:00 2001 From: kjs3 Date: Fri, 27 Dec 2013 12:12:08 -0500 Subject: [PATCH 01/10] Specifying ORIGIN on 'git remote update'. --- hubflow-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hubflow-common b/hubflow-common index e27dab882..9205dd519 100644 --- a/hubflow-common +++ b/hubflow-common @@ -354,7 +354,7 @@ hubflow_local_merge_helper() { } hubflow_fetch_latest_changes_from_origin() { - git remote update || die "Unable to get list of latest changes from '$ORIGIN'" + git remote update "$ORIGIN" || die "Unable to get list of latest changes from '$ORIGIN'" git fetch "$ORIGIN" || die "Unable to fetch latest changes from '$ORIGIN'" git fetch --tags || die "Unable to fetch latest tags from '$ORIGIN'" } From a2810459e2bc65d48b6c861f22f59f85cda65d4f Mon Sep 17 00:00:00 2001 From: Darin MacRae Date: Wed, 10 Jun 2015 10:59:19 -0700 Subject: [PATCH 02/10] Because the $BRANCH variable is both empty and the git commands require the feature prefix. --- git-hf-feature | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/git-hf-feature b/git-hf-feature index 03fba4c20..adeb89b81 100644 --- a/git-hf-feature +++ b/git-hf-feature @@ -483,15 +483,17 @@ cmd_checkout() { # # - https://github.com/bmomberger-reciprocity # - https://github.com/jhofmeyr + + warn "'$NAME' -> '$FEATURE_BRANCH'" # does the feature already exist? - if git_local_branch_exists "$BRANCH" ; then + if git_local_branch_exists "$FEATURE_BRANCH" ; then # we have a local branch - use that - hubflow_change_branch "$BRANCH" - elif git_remote_branch_exists "$ORIGIN/$BRANCH" ; then + hubflow_change_branch "$FEATURE_BRANCH" + elif git_remote_branch_exists "$ORIGIN/$FEATURE_BRANCH" ; then # we have a remote branch - create a local feature branch based # on the remote branch - git checkout -b "$BRANCH" --track "$ORIGIN/$BRANCH" + git checkout -b "$FEATURE_BRANCH" --track "$ORIGIN/$FEATURE_BRANCH" else # the user is really trying to start a new feature # From ef2f014b519d7a725d4ae084e3bb3f5a07cd9e45 Mon Sep 17 00:00:00 2001 From: Darin MacRae Date: Wed, 10 Jun 2015 11:02:24 -0700 Subject: [PATCH 03/10] Because the warn was only for testing. --- git-hf-feature | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/git-hf-feature b/git-hf-feature index adeb89b81..b3f40e327 100644 --- a/git-hf-feature +++ b/git-hf-feature @@ -484,9 +484,7 @@ cmd_checkout() { # - https://github.com/bmomberger-reciprocity # - https://github.com/jhofmeyr - warn "'$NAME' -> '$FEATURE_BRANCH'" - - # does the feature already exist? + # does the feature already exist? if git_local_branch_exists "$FEATURE_BRANCH" ; then # we have a local branch - use that hubflow_change_branch "$FEATURE_BRANCH" From f086d9a27c7438f03f0a06e2a710b1ada2bf8486 Mon Sep 17 00:00:00 2001 From: Darin MacRae Date: Fri, 8 Jan 2016 12:12:30 -0800 Subject: [PATCH 04/10] Because the installation script didn't correctly handle installing on Git for Windows --- contrib/README.md | 12 ++++++++++++ contrib/msysgit-install.cmd | 13 ++++++------- 2 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 contrib/README.md diff --git a/contrib/README.md b/contrib/README.md new file mode 100644 index 000000000..716edb147 --- /dev/null +++ b/contrib/README.md @@ -0,0 +1,12 @@ +Installing on Windows +===================== + +After following the basic instruction for cloning... + +1. Open a command prompt with Administrative privilege +2. cd into gitflow\contrib +3. ensure that GIT_HOME is pointing to the installation folder of Git (e.g. C:\Users\darin\AppData\Local\Programs\Git\cmd) +4. Run msysgit-install + +Note, that it works with installations of Git other than MSysGit. + diff --git a/contrib/msysgit-install.cmd b/contrib/msysgit-install.cmd index 5f005bfa7..fc6d723e9 100644 --- a/contrib/msysgit-install.cmd +++ b/contrib/msysgit-install.cmd @@ -20,25 +20,24 @@ 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 +if not exist "%GIT_HOME%\git-hf" goto :Install +echo HubFlow 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" +for /F %%i in ("%GIT_HOME%\git-hf*" "%GIT_HOME%\git-hf-*" "%GIT_HOME%\hubflow-*") do if exist "%%~fi" del /F /Q "%%~fi" :Install echo Copying files... ::goto :EOF -xcopy "%~dp0\..\git-flow" "%GIT_HOME%\bin" /Y /R /F +xcopy "%~dp0\..\git-hf" "%GIT_HOME%" /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 -xcopy "%~dp0\..\shFlags\src\shflags" "%GIT_HOME%\bin\gitflow-shFlags" /Y /R /F || set ERR=1 +xcopy "%~dp0\..\git-hf*" "%GIT_HOME%" /Y /R /F || set ERR=1 +xcopy "%~dp0\..\hubflow-*" "%GIT_HOME%" /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." From d3f660cba0b96a6a3f1a2e4b7720872b1e32f6b8 Mon Sep 17 00:00:00 2001 From: Darin MacRae Date: Fri, 8 Jan 2016 12:24:12 -0800 Subject: [PATCH 05/10] Because for some reason a line got deleted --- contrib/msysgit-install.cmd | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/msysgit-install.cmd b/contrib/msysgit-install.cmd index fc6d723e9..5b345e48c 100644 --- a/contrib/msysgit-install.cmd +++ b/contrib/msysgit-install.cmd @@ -38,6 +38,7 @@ if errorlevel 4 if not errorlevel 5 goto :AccessDenied if errorlevel 1 set ERR=1 xcopy "%~dp0\..\git-hf*" "%GIT_HOME%" /Y /R /F || set ERR=1 xcopy "%~dp0\..\hubflow-*" "%GIT_HOME%" /Y /R /F || set ERR=1 +xcopy "%~dp0\..\shFlags\src\shflags" "%GIT_HOME%\hubflow-shFlags" /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." From cf4f93ae1aa64566b7a5ee0daf8310e55d41919a Mon Sep 17 00:00:00 2001 From: Darin MacRae Date: Mon, 11 Jan 2016 15:27:28 -0800 Subject: [PATCH 06/10] Adding note to use --recursive when cloning --- contrib/README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/contrib/README.md b/contrib/README.md index 716edb147..eee240928 100644 --- a/contrib/README.md +++ b/contrib/README.md @@ -1,12 +1,11 @@ Installing on Windows ===================== -After following the basic instruction for cloning... - -1. Open a command prompt with Administrative privilege -2. cd into gitflow\contrib -3. ensure that GIT_HOME is pointing to the installation folder of Git (e.g. C:\Users\darin\AppData\Local\Programs\Git\cmd) -4. Run msysgit-install +1. git clone --recursive https://github.com/DarinMacRae/gitflow.git +2. Open a command prompt with Administrative privilege +3. cd into gitflow\contrib +4. ensure that GIT_HOME is pointing to the installation folder of Git (e.g. C:\Users\darin\AppData\Local\Programs\Git\cmd) +5. Run msysgit-install Note, that it works with installations of Git other than MSysGit. From 829d1245725977521dfcf1a5d12b6f0c4e447453 Mon Sep 17 00:00:00 2001 From: Darin MacRae Date: Wed, 16 Mar 2016 07:55:25 -0700 Subject: [PATCH 07/10] Update README.md --- contrib/README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/contrib/README.md b/contrib/README.md index eee240928..290381b55 100644 --- a/contrib/README.md +++ b/contrib/README.md @@ -3,8 +3,13 @@ Installing on Windows 1. git clone --recursive https://github.com/DarinMacRae/gitflow.git 2. Open a command prompt with Administrative privilege + (Don't use Powershell) 3. cd into gitflow\contrib -4. ensure that GIT_HOME is pointing to the installation folder of Git (e.g. C:\Users\darin\AppData\Local\Programs\Git\cmd) +4. ensure that GIT_HOME is pointing to the installation folder of Git + e.g. + set GIT_HOME=C:\Users\\AppData\Local\Programs\Git\cmd + set GIT_HOME=C:\Program Files\Git\usr\bin + 5. Run msysgit-install Note, that it works with installations of Git other than MSysGit. From 5bdc30dfadcc39841cf2d915b68ed6cd0f799e38 Mon Sep 17 00:00:00 2001 From: Stuart Herbert Date: Wed, 31 Jan 2018 20:08:10 +0000 Subject: [PATCH 08/10] tmp --- hubflow-common | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hubflow-common b/hubflow-common index 9205dd519..945e84bb1 100644 --- a/hubflow-common +++ b/hubflow-common @@ -220,6 +220,11 @@ hubflow_change_branch() { } hubflow_branch_push() { + # make sure we have something to push onto the stack + if [[ -z $1 ]] ; then + die "*** internal error: attempt to push empty item onto the stack" + fi + # make sure we have a stack to push onto if [[ -z BRANCH_STACK ]] ; then BRANCH_STACK=() From c4576c26a993737367250aa0e3b8f7f8c357fc0c Mon Sep 17 00:00:00 2001 From: Stuart Herbert Date: Wed, 31 Jan 2018 20:28:05 +0000 Subject: [PATCH 09/10] Version bump for hotfix release --- hubflow-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hubflow-common b/hubflow-common index 945e84bb1..5d7cf513f 100644 --- a/hubflow-common +++ b/hubflow-common @@ -44,7 +44,7 @@ # Common variables # -HUBFLOW_VERSION=1.5.2 +HUBFLOW_VERSION=1.5.3 HUBFLOW_REPO=https://github.com/datasift/gitflow # From ddf9ee1898a947e56b5812a9d708d9583afb7c65 Mon Sep 17 00:00:00 2001 From: Stuart Herbert Date: Wed, 31 Jan 2018 20:28:55 +0000 Subject: [PATCH 10/10] Fix: stop using empty pathspecs --- hubflow-common | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hubflow-common b/hubflow-common index 5d7cf513f..1e01a42eb 100644 --- a/hubflow-common +++ b/hubflow-common @@ -250,10 +250,11 @@ hubflow_branch_pop() { # make sure the stack is not empty [[ $BRANCH_STACK_SP != 0 ]] || die "Internal error: attempt to pop from empty BRANCH_STACK" - # pop the branch from the stack - local popped_branch=${BRANCH_STACK[$BRANCH_STACK_SP]} - BRANCH_STACK[$BRANCH_STACK_SP]= - let "BRANCH_STACK_SP -= 1" + # pop the branch from the stack + local tmp_branch_sp=$BRANCH_STACK_SP + let "BRANCH_STACK_SP -= 1" + local popped_branch=${BRANCH_STACK[$BRANCH_STACK_SP]} + unset BRANCH_STACK[$tmp_branch_sp] # do we need to switch branch too? hubflow_change_branch "$popped_branch"