Use git-for-each-ref to check whether the origin branch exists.
Use git-for-each-ref to check whether the origin branch exists.

This works in repositories that have their refs packed by
"git-pack-refs --all --prune" whereas testing the file
$git_dir/refs/heads/$opt_o does not.

Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>

Signed-off-by: Junio C Hamano <dc50d1021234060e53ec42a77d526afa2fe07479@cox.net>

destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git