Source:
<code>protected void run() throws Exception { if (localName != null && gitdir != null) throw die(CLIText.get().conflictingUsageOf_git_dir_andArguments); final URIish uri = new URIish(sourceUri); File localNameF; if (localName == null) { try { localName = uri.getHumanishName() + (isBare ? <START> Constants.DOT_GIT : <END> ""); localNameF = new File(SystemReader.getInstance().getProperty( Constants.OS_USER_DIR), localName); } catch (IllegalArgumentException e) { throw die(MessageFormat.format( CLIText.get().cannotGuessLocalNameFrom, sourceUri)); } } else localNameF = new File(localName); if (branch == null) branch = Constants.HEAD; CloneCommand command = Git.cloneRepository(); command.setURI(sourceUri).setRemote(remoteName).setBare(isBare) .setNoCheckout(noCheckout).setBranch(branch) .setCloneSubmodules(cloneSubmodules); command.setGitDir(gitdir == null ? null : new File(gitdir)); command.setDirectory(localNameF); boolean msgs = quiet == null || !quiet.booleanValue(); if (msgs) { command.setProgressMonitor(new TextProgressMonitor(errw)) .setCallback(this); outw.println(MessageFormat.format( CLIText.get().cloningInto, localName)); outw.flush(); } try { db = command.call().getRepository(); if (msgs && db.resolve(Constants.HEAD) == null) outw.println(CLIText.get().clonedEmptyRepository); } catch (InvalidRemoteException e) { throw die(MessageFormat.format(CLIText.get().doesNotExist, sourceUri)); } finally { if (db != null) db.close(); } if (msgs) { outw.println(); outw.flush(); } }</code><technical_language>Minor detail: DOT_GIT_EXT (also in CloneCommand). I JGit constants ".git", supposed for a .git directory a file name extension. long both, I consistently</technical_language>

Target:
protected void run() throws Exception { if (localName != null && gitdir != null) throw die(CLIText.get().conflictingUsageOf_git_dir_andArguments); final URIish uri = new URIish(sourceUri); File localNameF; if (localName == null) { try { localName = uri.getHumanishName() + (isBare ? Constants.DOT_GIT_EXT : ""); localNameF = new File(SystemReader.getInstance().getProperty( Constants.OS_USER_DIR), localName); } catch (IllegalArgumentException e) { throw die(MessageFormat.format( CLIText.get().cannotGuessLocalNameFrom, sourceUri)); } } else localNameF = new File(localName); if (branch == null) branch = Constants.HEAD; CloneCommand command = Git.cloneRepository(); command.setURI(sourceUri).setRemote(remoteName).setBare(isBare) .setNoCheckout(noCheckout).setBranch(branch) .setCloneSubmodules(cloneSubmodules); command.setGitDir(gitdir == null ? null : new File(gitdir)); command.setDirectory(localNameF); boolean msgs = quiet == null || !quiet.booleanValue(); if (msgs) { command.setProgressMonitor(new TextProgressMonitor(errw)) .setCallback(this); outw.println(MessageFormat.format( CLIText.get().cloningInto, localName)); outw.flush(); } try { db = command.call().getRepository(); if (msgs && db.resolve(Constants.HEAD) == null) outw.println(CLIText.get().clonedEmptyRepository); } catch (InvalidRemoteException e) { throw die(MessageFormat.format(CLIText.get().doesNotExist, sourceUri)); } finally { if (db != null) db.close(); } if (msgs) { outw.println(); outw.flush(); } }