mirror of
https://github.com/git/git.git
synced 2025-12-18 12:00:25 +01:00
Since86ac751(Allow cloning an empty repository, 2009-01-23), doing: git clone does-not-exist has created does-not-exist as an empty repository. This was an unintentional side effect of86ac751. Even weirder, doing: git clone does-not-exist new-dir _does_ fail, making this "feature" (if you want to consider it such) broken. Let's detect this situation and explicitly die. It's almost certainly not what the user intended. This patch also adds two tests. One for the missing path case, and one to confirm that a similar case, cloning a non-repository directory, fails. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
3.4 KiB
Executable File
3.4 KiB
Executable File