setopt localoptions NO_shwordsplit
local action branch base staged unstaged revision misc
local line

branch="(unknown)"

while read line; do
	if [[ $line =~ "\* "* ]]; then
		branch="${line#\* }"
		break
	fi
done < <(${vcs_comm[cmd]} channel)

while read line; do
	if [[ "$line" =~ "State: "* ]]; then
		revision="${line#State: }"
		break
	fi
done < <(${vcs_comm[cmd]} log --state --limit 1)

VCS_INFO_formats "${action}" "${branch}" "${base}" "${staged}" "${unstaged}" "${revision}" "${misc}"