Bug 20098 - cloning into an exsting dir is actually allowed
: cloning into an exsting dir is actually allowed
Status: CLOSED FIXED
: 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)


Attachments


Note

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


Description From 2009-05-19 04:33:55
git-core-1.6.2.4-alt1

"man git-clone" says:

       <directory>
 ...
          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
/space/ivan/OUT/bugreports/ALT/git/repo/.git/
[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
/space/ivan/OUT/bugreports/ALT/git/existing/.git/
[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-1.5.5.5-alt1 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
55892d23981917aefdb387ad7d0429f90cbd446a),
this change was documented in v1.6.3.1 (commit
ec00d6e0038e030cf73182374e21025c2776cb23).
------- Comment #3 From 2018-08-03 01:56:55 -------
Let's say it's fixed.