Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347852 - Cloning should fail when destination directory exists and is not empty
Summary: Cloning should fail when destination directory exists and is not empty
Status: RESOLVED FIXED
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Adrian Goerler CLA
QA Contact:
URL: http://egit.eclipse.org/r/#change,3518
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-31 15:25 EDT by Tomasz Zarna CLA
Modified: 2011-07-06 17:17 EDT (History)
1 user (show)

See Also:


Attachments
Screen shot indicating that non-empty traget directory is rejected (52.47 KB, image/png)
2011-07-04 02:52 EDT, Adrian Goerler CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Zarna CLA 2011-05-31 15:25:06 EDT
Copied from http://egit.eclipse.org/r/#change,3518:

In msysgit, when I try to clone into a folder that already
contains a cloned repository it will fail with a message "fatal:
destination path 'folder' already exists and is not an empty
directory.". I would expect JGit to throw an exception with a similar
message in that case.
Comment 1 Adrian Goerler CLA 2011-07-04 02:52:08 EDT
Created attachment 199027 [details]
Screen shot indicating that non-empty traget directory is rejected
Comment 2 Adrian Goerler CLA 2011-07-04 03:20:49 EDT
A non-empty target directory seems to be rejected in EGit on ui-level (see https://bugs.eclipse.org/bugs/attachment.cgi?id=199027).

Still there should be an additional check in JGit on command-level.
Comment 3 Matthias Sohn CLA 2011-07-06 17:17:21 EDT
merged as 172a9f05216394f243805844b446cc357dd6b943