use $repo->is_workdir instead of isa
add xt command
add support for patching from diff url