Centralize handling of differences between clone_ implementations

Refactor duplicated code into a single method of WorkingArea
Merge branch 'master-refactor-CliGit-clone-dependency' into master-work