Fix tracking branches in dynamic repositories#464
Fix tracking branches in dynamic repositories#464JakeGinnivan merged 2 commits intoGitTools:masterfrom johannesegger:no-tracking-branch-in-dynamic-repo
Conversation
…n using a dynamic repository
|
Is this still happening on the V3 beta branch, or is this only on v2? |
|
I tried this on master (97dade8), which is ahead of 3.0.0-Beta3 |
|
Just to confirm, the 3.0.0 release hasn't been merged yet: https://github.com/ParticularLabs/GitVersion/tree/release/3.0.0 Can you try on this? |
|
Sorry, I don't understand, running |
|
To the best of my knowledge, although I hadn't checked, the beta code hasn't been merged to master, but I could be wrong. @JakeGinnivan could confirm. You could well be right, and I am just a little behind 😸 |
|
Yeah, GitHub also says that release/3.0.0 is 0 commits ahead of master and 4 commits behind it :-) |
|
Sorry for confusion, I am just using release branch for releasing betas. Am keeping master in sync/ahead Sent from my Windows Phone From: Johannes Eggermailto:notifications@github.com I tried this on master (97dade897dade8), which is ahead of 3.0.0-Beta3 — |
|
Ping @nulltoken, thoughts on the libgit2sharp question? |
@JakeGinnivan Thanks for the ping! @eggapauli Could you please elaborate further regarding what makes you think that? |
|
I was wrong. I think the problem was that a local ref was added, but it wasn't set up to track the remote ref. |
There was a problem hiding this comment.
Would GV be run on a development environment, this would blindly overwrite the potentially existing tracking configuration for every considered branch. Is this expected?
/cc @JakeGinnivan
There was a problem hiding this comment.
I think these statements are only executed for newly created branches, otherwise they are skipped due to the if statement in line 192.
There was a problem hiding this comment.
Correct, this normalisation code should only ever happen on the build server.
There was a problem hiding this comment.
Even without that if statement which was highlighted. Are there any other scenarios this could happen?
There was a problem hiding this comment.
(other than normalisation)
…repo Fix tracking branches in dynamic repositories
When running GitVersion with a dynamic repository using a new branch it cannot find a remote tracking branch. I dug a bit deeper and found that in
GitHelper.CreateMissingLocalBranchesFromRemoteTrackingOnestheremoteTrackingReferenceis aDirectReference, but I think it should be aSymbolicReferencefor this to work.I'm not sure how to fix this as I'm not familiar with LibGit2Sharp. Any advice?