Git status porcelain output uses leading spaces for status indicators; trim() was stripping them which could break parsing.