Hi everyone,
I'm doing a 3 way merge and update using git and meld.
There are 3 code bases in play.
origin, fork1 and my fork.
I'm not entirely sure how many revisions back fork1 was forked from the
origin code.
My fork is based off from fork1.
Recently (as in the last 6 months) origin has undergone a major overhaul.
Among the changes to origin are a move from one embedded DB to another much
faster one as well as hundreds of little bug fixes and changes to make
things more stable.
But I'm running into problems in my merge.
For instance in many places, Origin has...
pstart->nVersion
but fork1 has
pstart->nVersion&0xff
According to the header nVersion is defined as an int.
For the life of me I just can't understand what fork1 is doing with that
line of code. It's possible that this code was present in the origin code
base and only modified later, frankly I'm not sure how I would go about
checking.
Still the line is bothering me, it's used in several places usually in
something along the lines of
if(pstart->nVersion >= 2){do something}
and in the fork code it's the same except fork1 has the &0xff part as well.
if ((pstart->nVersion&0xff) >= 2){do something}
I'm reading the origin code as
pstart object nVersion
and the fork1 code as
pstart object nVersion at byte 255
So it's not making much sense to me.
I realize that an int in C++ is 4 bytes, and so this may be saying look at
only the first (or possibly second) 2 bytes. Even so I'm not sure which it
may be saying to look at or for that matter why would we only look at 2
bytes of a 4 byte int.
Unfortunately the author of fork1 has not responded to any of my queries
and it's quite possible that the code is abandoned at this point.
Either way I want to merge the updates from origin into my codebase while
still preserving the awesomeness that is fork1. The author of fork1 did
not declare which version of origin he forked from, but his code is less
than the 6 month time frame. I'm not sure how I could go about rolling
back origin to match his original code.
Can someone please give me advice on this?
Thanks!
/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/