{"thread":{"id":"8155","subject":"git-clone tries to cd to a remote repository","startedAt":"2007-05-14T15:41:25Z","lastAt":"2007-05-14T21:25:52Z","messageCount":2,"participants":["Tero Roponen","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"42158","messageId":"Pine.LNX.4.64.0705141836350.26948@jalava.cc.jyu.fi","threadId":"8155","inReplyTo":null,"subject":"git-clone tries to cd to a remote repository","fromName":"Tero Roponen","fromEmail":"teanropo@jyu.fi","sentAt":"2007-05-14T15:41:25Z","receivedAt":"2007-05-14T15:41:25Z","isPatch":false,"sender":{"key":"teanropo@jyu.fi","avatar":null},"body":"Hi,\n\nthe latest git seems to output a warning every time I\ntry to clone a repository that is not local:\n\n$ git --version\ngit version 1.5.2.rc3.27.g43d151\n\n$ git clone git://git.kernel.org/pub/scm/git/git.git\n/usr/local/bin/git-clone: line 23: cd: git://git.kernel.org/pub/scm/git/git.git: No such file or directory\nInitialized empty Git repository in /home/terrop/repositories/git/.git/\nremote: Generating pack...\n...\n\nI think the output should be redirected to /dev/null,\nbut I'm not a shell/git guru...\n\n-- \nTero Roponen\n"},{"id":"42166","messageId":"7vr6pjm71b.fsf@assigned-by-dhcp.cox.net","threadId":"8155","inReplyTo":"Pine.LNX.4.64.0705141836350.26948@jalava.cc.jyu.fi","subject":"[PATCH] Fix git-clone buglet for remote case.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-05-14T21:25:52Z","receivedAt":"2007-05-14T21:25:52Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"c2f599e09fd0496413d1744b5b89b9b5c223555d introduced a buglet while\ncloning from a remote URL; we forgot to squelch the unnecessary\nerror message when we try to cd to the given \"remote\" name,\nin order to see if it is a local directory.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n\nTero Roponen <teanropo@jyu.fi> writes:\n\n  > the latest git seems to output a warning every time I\n  > try to clone a repository that is not local:\n  >\n  > $ git --version\n  > git version 1.5.2.rc3.27.g43d151\n  >\n  > $ git clone git://git.kernel.org/pub/scm/git/git.git\n  > /usr/local/bin/git-clone: line 23: cd: git://git.kernel.org/pub/scm/git/git.git: No such file or directory\n\n  Yup, thankfully that is harmless but it is ugly and wrong\n  nevertheless.  Thanks for the report.\n\n git-clone.sh |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/git-clone.sh b/git-clone.sh\nindex 70374aa..fdd354f 100755\n--- a/git-clone.sh\n+++ b/git-clone.sh\n@@ -22,10 +22,10 @@ get_repo_base() {\n \t\tcd \"`/bin/pwd`\" &&\n \t\tcd \"$1\" &&\n \t\t{\n-\t\t\tcd .git 2>/dev/null\n+\t\t\tcd .git\n \t\t\tpwd\n \t\t}\n-\t)\n+\t) 2>/dev/null\n }\n \n if [ -n \"$GIT_SSL_NO_VERIFY\" ]; then\n-- \n1.5.2.rc3.27.g43d151\n"}]}