gitcmds: add a changed_files() helper function