macgitver/libGitWrap — pull request #22 by antis81 (2013-07-30 12:25:20+00:00)
Title: Feature: invalidate

The invalidate method is able to internally replace the underlying lg2 objects or in other words "invalidate" the wrapper object by assigning a 0 pointer to the member. This allows safe synchronization of Git objects relying on the GitPtr system.

For example:
A rename action on a branch invalidates the underlying `git_reference *` and replaces it with a new one, free'ing the memory and doing the right thing from bottom up to the top. Thus every used `Git::Reference` object used in the UI (or anywhere else) points to the same memory and thus gets the same information.

Note:
External changes e.g. from the terminal or whatever can still not be recognized. This needs to be addressed separately.