Does the –local actually do anything when used with git clone ?

According to the output of git help clone the --local option does the following:

   --local, -l
       When the repository to clone from is on a local machine, this flag bypasses the normal "Git
       aware" transport mechanism and clones the repository by making a copy of HEAD and everything
       under objects and refs directories. The files under .git/objects/ directory are hardlinked to
       save space when possible.

       If the repository is specified as a local path (e.g., /path/to/repo), this is the default, and
       --local is essentially a no-op. If the repository is specified as a URL, then this flag is
       ignored (and we never use the local optimizations). Specifying --no-local will override the
       default when /path/to/repo is given, using the regular Git transport instead.

If I’m reading this correctly, the second paragraph says this option will default to on whenever a local path is given, and will be ignored whenever the given path is not local. So what’s the point? How can it even ever have any effect? Is it basically a no-op stub for compatibility with older versions of git when it did something?

  • Gerrit error while pushing commit with egit
  • Git-based website deployment workflow
  • Git ignore directory using absolute path
  • Update to latest git version 2.2.x in CentOS
  • Version control system capable of handling file moves?
  • Best practices for php project organization using GIT?
  • What is the meaning of these red bars in git file difference
  • Github for Windows ignoring .gitignore Visual Studio
  • Merging subtree changes - fatal: invalid path 'somefile_BASE_20704.cs'
  • git remove merge commit from history
  • Import unrelated repository to another repository branch
  • JIRA + fisheye + git -> how to repair missing links?
  • One Solution collect form web for “Does the –local actually do anything when used with git clone ?”

    This is leaked technical detail – the way to implement the --no-X options. Instead of defining alone --no-local there is option --local which is noop, but it has --no-* version. Same way (though it is not mentioned in help) you can run git clone --checkout ... but it would not affect anything because clone checks out by default.

    PS: some long time ago it was not a default, so using it did make sense.

    Git Baby is a git and github fan, let's start git clone.