Change method to determine if branch is dirty (#16675)
Change method to determine if branch is dirty (#16675)

The approach we are using has some flaws. I don't really understand why,
but it seems `git diff-index` is not idempotent or something and will
actually return dirty sometimes when it isn't. This results in our
binaries published with a `-dirty` suffix.

Kubernetes uses this approach so should be pretty stable.
smawson/istio,geeknoid/istio,istio/istio,smawson/istio,geeknoid/istio,istio/istio,smawson/istio,smawson/istio,geeknoid/istio,istio/istio,istio/istio,geeknoid/istio,smawson/istio,geeknoid/istio,geeknoid/istio,istio/istio,smawson/istio