Closed gnsoria closed 5 years ago
Thanks for reporting, we'll be trying to replicate this. To clarify, by changing a user form object, you are referring to moving a text box (let's say) without changing the underlying VBA code, correct?
@fzumstein correct. I didn't check to see if this occurs when code is changed in the userform, but my gut tells me probably not?
@gnsoria could be please check if you still get this error with the latest version (0.4.1)? My guess is that this was fixed by https://github.com/xlwings/git-xl/issues/40
@fzumstein Sorry for the delay in response. I'm trying to check this but got a new computer and had to switch from xltrail (no longer installed) to XL. I'm unable to use git with my repo. Can you tell me if there is an existing solution to this?
error: cannot spawn git-xltrail-diff.exe: No such file or directory
fatal: external diff died, stopping at CTMAddIn.xlam
If not, I can make a separate issue.
Until I can get that sorted out, I can't check to make sure this is fixed.
Thanks!
Hi @gnsoria, sorry the migration docs are currently not existing - I'll fix that. Did you use the local installation that writes to your .gitattributes
file? Simply go in there and replace all occurrences of xltrail
with xl
.
@fzumstein ah, that solved it the transition issue.
Ok, I did my best to reproduce the original bug. It appears to still be broken, but in a different way. I realize now that I didn't leave great instructions here for how to reproduce (sorry!) so here's what I did this time:
bug
master
and create a conflicting code change. I didn't touch the userform in this step.git merge bug
. This raised a merge conflict.It looks like it properly marks the merge conflict in the code now (success). Unfortunately, it seemed to revert the userform change I made, and I couldn't see any way to tell it which userform version to accept. Also, the userform in the VB Editor is abnormally small, even though the zoom is normal. Loading the userform in a spreadsheet looks normal; it's just when I try to edit it. This weird zoom sticks around even if I close Excel and reopen.
Great to hear the migration worked.
Since we only merge VBA code, sheets and everything else (including user forms) will behave the same as without Git XL. That is, it'll show just one version, yes. Have a look at my recent blog post to see if that helps? https://www.xltrail.com/blog/merge-excel-workbooks-with-git
Hmm, ok. I suppose that does make sense. So it'll merge the VBA code (even code in the userform?) but stick with master
's version of the userform (or whichever branch you're merging into)?
Yes, the VBA part of user forms, too. And yes, Git's behaviour is to stick with the current version of your branch (but the file will be marked as merge conflict, so you'll need to resolve that). I am closing this issue as I consider this resolved. Feel free to re-open if you have more issues.
I really appreciate the help @fzumstein!
When trying to merge two workbooks, one with just a code change and one with a conflicting code change and a change to a userform object, xltrail fast-forwards to the one with the userform change and doesn't raise a merge conflict. Both commits show up in the log. When diffing between them, the conflicting code change appears.
This is the first bug report I'm made so I'm not sure what info you need, but if it helps, here's what I'm seeing on the command line: