Bug 20098 - cloning into an exsting dir is actually allowed
: cloning into an exsting dir is actually allowed
: Sisyphus
(All bugs in Sisyphus/git-core)
: unstable
: all Linux
: P3 minor
Assigned To:
  Show dependency tree
Reported: 2009-05-19 04:33 by
Modified: 2018-08-03 01:56 (History)



You need to log in before you can comment on or make changes to this bug.

Description From 2009-05-19 04:33:55

"man git-clone" says:

          Cloning into an existing directory is not allowed.

but in practice git doesn't conform to this:

[ivan@dell git]$ mkdir repo
[ivan@dell git]$ cd repo
[ivan@dell repo]$ git init
Initialized empty Git repository in
[ivan@dell repo]$ echo a > a
[ivan@dell repo]$ git add a
[ivan@dell repo]$ git commit -m 'Initial.'
[master (root-commit) 52dfade] Initial.
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 a
[ivan@dell repo]$ mkdir ../existing
[ivan@dell repo]$ git clone . ../existing/
Initialized empty Git repository in
[ivan@dell repo]$ cd ../existing/
[ivan@dell existing]$ git status
# On branch master
nothing to commit (working directory clean)
[ivan@dell existing]$
------- Comment #1 From 2009-05-20 01:40:31 -------
Contrastingly, git-core- from 4.1 adheres to the documentation.
------- Comment #2 From 2009-06-05 01:58:24 -------
Cloning into an existing empty directory is allowed since v1.6.2 (commit
this change was documented in v1.6.3.1 (commit
------- Comment #3 From 2018-08-03 01:56:55 -------
Let's say it's fixed.