git_prompt: fix non-informative upstream

`test -n informative` will always succeed.  We want to test the
informative variable instead so that other modes can still work.