Twenga/twgit

"release remove <release>" create a tag

olaurendeau opened this issue · 2 comments

When using "release remove " command, it create a tag like for a "release finish" command, is it the expected behavior ? I would expect from this command that she just delete the release branch.

[vagrant@project: ~/www/repository-rr]
 (feature/cp-354 $) [09:45:01] $ twgit release remove 2.42.0
Check valid ref name...
Check clean working tree...
git# git fetch --prune origin
Check valid ref name...
Check valid tag name...
Check whether tag '2.42.0' already exists...
git# git checkout master
Switched to branch 'master'
Your branch is behind 'origin/master' by 4 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
Check health of 'master' branch...
git# git merge origin/master
Updating a04332e..461d524
Fast-forward
 .../Bundle/MainBundle/Http/FileResponse.php        | 22 +++++++++++++++++++++-
 .../MainBundle/Tests/Http/FileResponseTest.php     |  4 ++--
 2 files changed, 23 insertions(+), 3 deletions(-)
git# git branch -D release/2.42.0
Deleted branch release/2.42.0 (was 68341ec).
git# git push origin :release/2.42.0
To git@github.com:repository/repository-rr.git
 - [deleted]         release/2.42.0
git# git tag -a v2.42.0 -m "[twgit] Release remove: release/2.42.0"
git# git push --tags origin master
To git@github.com:repository/repository-rr.git
 * [new tag]         v2.42.0 -> v2.42.0

Hi,

Indeed, twgit release remove creates a new tag, in the same way that twgit release finish.
When you type twgit release then enter, a small doc appear:

$ twgit release 

(i) Usage:
    twgit release <action>

(i) Available actions are:
[…] 
    remove <releasename>
        Remove both local and remote specified release branch. No feature will
        be removed. Despite that, create the same tag as finish action to clearly
        distinguish the next release from this one.
[…]

The danger if no tag were created on release remove, is a developer pulled the old release and cannot do more git pull or push on it because a new branch with same name replaced it on parent repository.

Let me know if you need any further information :-)
Geoffroy

OK I see your point, thanks for your explanation :)