Fix GitClient.get_repository_info to not change the working directory.

Review Request #9886 — Created April 23, 2018 and submitted — Latest diff uploaded

Information

RBTools
release-1.0.x
116237f...

Reviewers

One particularly annoying aspect of the GitClient is that it changes the
working directory after scanning. This has a variety of impacts, and
makes it hard to implement certain things like more advanced client
detection.

This change fixes it up so that we can pass in a cwd argument to
Popen. Instead of changing the working directory for the entire
process, we just do so for the subprocesses that get executed.

  • Ran unit tests on Python 2.7 and 3.6.
  • Did a variety of operations with a git repository.