Instead of defaulting to origin/master, default to local master's upstream branch. In 99.9% of cases, this will be master. Sometimes, though, a user might want to set their local master to some faux-master topic branch.
git rev-parse --abbrev-ref --symbolic-full-name "master@{u}"
will return origin/master.