Necessary Maintenance #7262

Updated by Christopher Green over 6 years ago

On Tuesday 2014/10/21 at 10:55 CDT, an erroneous tag and merge was made to the main repository's @master@ and @develop@ branches. The tag was *@v1_12_03@*.

The changes to be made to the repository will change the origin/master and origin/develop branches to preserve their states at tag time and @HEAD@ while cleaning up the merge history to retain readability. The @v1_12_03@ tag will be moved to a new branch @v1_12-branch@ which will be constructed to allow the code representing the tag to remain identical while allowing the aforementioned cleanup.

If you have a local clone of the repository via any method (e.g. @http@ or @ssh@), please for each clone:

# Make a tarfile backup with (_e.g._):<pre>( cd .. ; tar jcf <tarfile> <local-repo-name> )</pre> Do not skip this step unless you like losing work!
# If you have not pulled or fetched @origin/develop@ or @origin/master@ from since before the faulty merge 2014/10/21, then please refrain from doing so until you have been given the all-clear. This is the only action required of you in this case.
# If you have, or you think you may have, any local branches with the bad merge in the tree (including develop), you may check with the following command:<pre>git branch -a | grep -v remotes | sed -e 's&\*& &g' | while read branch; do git rev-list "${branch}" | grep -q 41d89bdb99254440fb52d00d79ce8ad6db2991cb && echo "${branch}"; done</pre>
# For each branch whose name was printed as a result of the above command (i.e. has the offending merge):
## Commit any local changes you wish to preserve. This includes anything you currently have stashed, since the stash will also be no good after the repair has been made.
## Then, execute the following command to preserve your changes:<pre>git checkout <branch>
git format-patch --stdout <first-good-sha1>..<last-good-sha1> > <branch>-rescue.txt</pre>Note the literal @..@ separating the two SHA1s. @git log@ or @gitk@ can help you decide which commits you need to keep.
# Update the metadata for upstream branches:<pre>git fetch origin</pre>
# For each branch identified by step (3), when *and only when* you receive the all clear that the repair has been made:
** If there is a remote tracking branch (_e.g._ @master@ and @develop@):<pre>git checkout <branch>
git reset --hard origin/<branch>
# If you have a saved patch:
git am <branch>-rescue.txt</pre>
** If your branch has no remote tracking branch:<pre>git branch -D <branch>
git checkout -b <branch> origin/develop
# If you have a saved patch:
git am <branch>-rescue.txt</pre>
# Update the tag:<pre>git fetch --tags</pre>

As of right now, there are no published feature branches which include the bad merge commit, so no-one should have to deal with that eventuality.