-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Version Tag w/ Same Name As Release Branch Does Not Finish Properly #221
Comments
just change versiontag to |
@sirlancelot Obviously the bug won't happen if I don't do the thing that causes the bug. :) And I specifically want to use |
@jfelchner Technically I think you are right with your proposal. By the letter of "law" the implemented way is the right way. When creating a release, you update your production code (master branch), you tag it and you are done. |
@jfelchner Here's a solution for you, instead of messing with the order, Open the file git-flow-release and edit line 256 git merge --no-ff "$BRANCH" || \ to look like git merge --no-ff "refs/heads/$BRANCH" || \ |
Excellent, that should do it. Is this something I should do as a PR? |
I believe this change is very personal and not needed for public release. In general it's not a good idea to name tags and branches the same. Besides the "problem" you showed here it means there are other commands that will give the same warning message. If you are not keeping the the release branch, why not use release- as a prefix for the release branch git config gitflow.prefix.release release- I'm not sure about this statement "the tag's ref to be merged into development instead of the branch's ref. Very undesirable behavior." Not sure why it is undesirable to merge the tag instead of the branch. In fact in the source code of git-flow-feature the following comment suggests preferring merging tags over branches
With the current setup, git describe will not find a tag in the develop branch. Just my two cents on this. |
I'm not sure I understand why one would not want to fix a situation where a warning would show up if the fix is relatively simple and non-invasive. And it is a problem. Even the git flow page shows the release branch being merged both into http://nvie.com/posts/a-successful-git-branching-model/ It also specifically says:
And
This is clearly the branch being merged into If @nvie has decided to change the way it works, that's his prerogative as it's his project. But everything in the docs say the branch has priority over the tag. And all I'm saying is that if the release and the versiontag are the same, that doesn't happen. So if the desired result is to have the branch take priority when merging a release branch (as I feel it should), then there is a bug. If there is a bug, then the solution to the bug may be "We've decided not to fix that.", "We've changed the specifications for the application and this is no longer a bug" or "Let's get it fixed". "Don't do that", in my opinion, is not a proper solution. And as I said, I don't want to use |
One more point I forgot to address: The reason that merging the tag over merging the branch is "Very undesirable behavior." is because this potentially allows for commits to be made directly on By "condoning" commits to be made directly on What surprises? I'm glad you asked: Let's assume we follow these steps:
Scenario 1 (The way git-flow is "supposed" to work): Tests on Scenario 2 (What happens with this bug): Tests on |
Let me start with stating I'm not in a position to give decisive answer what to do with a bug in this project here :) The blog post was posted two years ago and not updated since. Currently git flow supports support branches which weren't mentioned in the original document.
Now fact is that this has been open and not addressed for almost two years. Personally I don't agree with your statement :
The reason I don't think it makes sense is the fact that if you have a release branch and you deploy a hotfix, those changes are merged in the master and develop branch. When you deploy your release branch the hotfix changes in the develop branch will disappear and the master and develop branch will always be diverged. As this issue has been open for almost 2 years I guess the conclusion we can draw that the solution for this bug is "We've decided not to fix that." P.S. I had written this comment and only then saw your 2nd follow up post. Test on develop passes |
@petervanderdoes I think we're going to just have to agree to disagree on this one. If what you say is right, it looks like nvie is also thinking along your lines. The fact that I don't agree doesn't really matter. ;) I'm going to leave this bug open though because I feel that the code should reflect that fact and I don't think it's correct to show the users a warning message in the event that the user chooses to have the I did want to have a further discussion about your last examples.
I believe here it may be a difference of our workflows. For us, we never deploy code directly from a user's local machine. All deployed code is pulled from a central repo (most of the time Github), and because of this, we get the extra security that, if another user has pushed changes (say a hotfix) to ...which I believe is also how you arrived at:
In my situation, again, using a central repo as the canonical source of truth, your last scenario would look like this:
At this point, they should both be completely synced. Although it is possible that the release branch merge caused a regression, merging
In the above examples, if tests are all passing at commits Thoughts? |
I love drawing diagrams as it tells me I was mistaken in the loss of a commit. I guess it doesn't really matter, branch or tag merging, except for when you merge the branch, you have the git describe problem on the develop branch. The develop branch has no knowledge of release tags. BTW, a solution about the hotfix branch existing with a release branch and passing test "4" would be to merge the hotfix in the release branch and not in the develop branch. There is an issue for that one issue #177
|
Agreed on merging into the release branch instead of I honestly never use Good discussion. Thanks @petervanderdoes. |
@petervanderdoes Just got back to this and I did, indeed, change my mind. Release branches and hotfixes should be merged into |
Our current git flow configuration:
Notice that the
versiontag
andrelease
are the same. When finishing a release using this configuration, git flow seems to:With this flow, the user receives
release/foo is not unambiguous ref name
or something similar. Additionally (as of my git version 1.7.9.5), this causes the tag's ref to be merged into development instead of the branch's ref. Very undesirable behavior.I believe what needs to happen instead is:
The text was updated successfully, but these errors were encountered: