ansible/ansible — pull request #790 by sfromm (2012-08-07 18:25:17+00:00)
Title: Fix error handling when switching versions

git module used to check stderr for the string 'error' after calling
switch_version(). This changes that to just look at the return code to
determine whether the command failed. If the rc is not zero, the git
module will call fail_json().

The problem is that git checkout will summarize the commit message,
such as:

HEAD is now at ea38409... removing artificial error

When the string 'error' is the commit message, this check will
erroneously think the command failed.

This also removes the method switchLocalBranch() since it is no longer
used.