Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with release when using rebase on features #162

Open
ltoussaint opened this issue Jan 11, 2016 · 1 comment
Open

Bug with release when using rebase on features #162

ltoussaint opened this issue Jan 11, 2016 · 1 comment
Labels

Comments

@ltoussaint
Copy link
Member

The is a bug when using rebase on a feature.

Use case

  • Create release
  • Create feature-1
  • Commit on feature-1 and push it
  • Merge feature-1 into release
  • Create feature-2
  • Need feature-2 to start from feature-1 and use rebase to do it
  • Commit on feature-2 and push it (this need a pull before the push)
  • Run twgit release list

In this case, we can see a warning on feature-2

Release: origin/release-1.1.0 (from v1.0.0) 
commit 98f92985220d06ce165d2a5689ecd42bd42d00fb
Author: Laurent Toussaint <laurent.toussaint@twenga.com>
Date:   Mon Jan 11 17:31:08 2016 +0100
Features:
    - origin/feature-1 [merged] 
    - origin/feature-2 /!\ merged, then in progress. 

But this feature is not merged into the release as we can see using git log on the release

The problem comes from the git pull creating a merge between the local feature and the distant one.
Ideally we should use the command git pull --rebase=true to prevent this error, but even using a simple git pull, we should not have this issue.

How to reproduce the issue bug

  • twgit version 1.17.0
  • git version 1.9.1

And run

twgit='twgit' \
  && cd /tmp && rm -rf /tmp/twgit \
  && mkdir -p /tmp/twgit/parent /tmp/twgit/local1 \
  && cd /tmp/twgit/parent && git init \
  && cd /tmp/twgit/local1 && $twgit init 1.0.0 /tmp/twgit/parent \
  && $twgit release start -I \
  && $twgit feature start 1 \
  && git commit --allow-empty -m "empty1" && git push origin feature-1 \
  && $twgit feature merge-into-release 1 \
  && $twgit feature start 2 \
  && git rebase feature-1 \
  && git commit --allow-empty -m "empty2" && git pull && git push origin feature-2 \
  && $twgit release list

How to fix it

Look at thiese functions

  • get_features merged_in_progress $release_fullname (inc/twgit_release.inc.sh line 252)
  • get_features merged_in_progress $super_branch (inc/common.inc.sh line 1171)
  • Maybe other functions
@ltoussaint ltoussaint added the bug label Jan 11, 2016
@ltoussaint
Copy link
Member Author

Maybe we should think about including git pull --rebase=true in a future command twgit feature pull

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant