jenkinsci/git-plugin — pull request #257 by joshuaspence (2014-09-23 03:53:45+00:00)
Title: Add a `GIT_PREVIOUS_SUCCESSFUL_COMMIT` environment variable

Add a `GIT_PREVIOUS_SUCCESSFUL_COMMIT` environment variable which is similar to `GIT_PREVIOUS_COMMIT` but refers to the most-recent successful build.

I'm happy to write tests for this but couldn't quite follow how the current tests are structured.