Detect the current environment without using the upstream.

Developers should have the freedom to set other upstreams on their Git branches.

Plus, there are other bugs e.g. issue #115 which make this useful.