{"thread":{"id":"2427","subject":"[PATCH 2/2] git-clone: Allow cloning into directories other than child of current dir.","startedAt":"2005-11-10T11:58:08Z","lastAt":"2005-11-10T11:58:08Z","messageCount":1,"participants":["Andreas Ericsson"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"11471","messageId":"20051110115808.466765BB44@nox.op5.se","threadId":"2427","inReplyTo":null,"subject":"[PATCH 2/2] git-clone: Allow cloning into directories other than child of current dir.","fromName":"Andreas Ericsson","fromEmail":"exon@op5.se","sentAt":"2005-11-10T11:58:08Z","receivedAt":"2005-11-10T11:58:08Z","isPatch":true,"sender":{"key":"exon@op5.se","avatar":"https://gravatar.com/avatar/b948c4f759e868f8e721e545e37afe2cf89cfa8e2ee8b70a432f0d76aee39891?d=mp&s=160"},"body":"\nThis patch adds -p to mkdir and an explicit check to see if the target\ndirectory exists (since mkdir -p doesn't throw an error if it does).\n\nSigned-off-by: Andreas Ericsson <ae@op5.se>\n\n---\n\n git-clone.sh |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\napplies-to: 28cfa6f299b27be02a24b6887f9b82b42c0e08cd\n48b959195a979b113e51e898ac878a0fd7cfb30a\ndiff --git a/git-clone.sh b/git-clone.sh\nindex 70cf7a2..4b98fb1 100755\n--- a/git-clone.sh\n+++ b/git-clone.sh\n@@ -98,7 +98,8 @@ fi\n dir=\"$2\"\n # Try using \"humanish\" part of source repo if user didn't specify one\n [ -z \"$dir\" ] && dir=$(echo \"$repo\" | sed -e 's#/*\\.git$##' -e 's#.*[/:]##')\n-mkdir \"$dir\" &&\n+[ -e \"$dir\" ] && $(echo \"$dir already exists.\"; usage)\n+mkdir -p \"$dir\" &&\n D=$(\n \t(cd \"$dir\" && git-init-db && pwd)\n ) &&\n---\n0.99.9.GIT\n"}]}