* git-clone tries to cd to a remote repository
@ 2007-05-14 15:41 Tero Roponen
2007-05-14 21:25 ` [PATCH] Fix git-clone buglet for remote case Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Tero Roponen @ 2007-05-14 15:41 UTC (permalink / raw)
To: junkio; +Cc: git
Hi,
the latest git seems to output a warning every time I
try to clone a repository that is not local:
$ git --version
git version 1.5.2.rc3.27.g43d151
$ git clone git://git.kernel.org/pub/scm/git/git.git
/usr/local/bin/git-clone: line 23: cd: git://git.kernel.org/pub/scm/git/git.git: No such file or directory
Initialized empty Git repository in /home/terrop/repositories/git/.git/
remote: Generating pack...
...
I think the output should be redirected to /dev/null,
but I'm not a shell/git guru...
--
Tero Roponen
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] Fix git-clone buglet for remote case.
2007-05-14 15:41 git-clone tries to cd to a remote repository Tero Roponen
@ 2007-05-14 21:25 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2007-05-14 21:25 UTC (permalink / raw)
To: Tero Roponen; +Cc: git
c2f599e09fd0496413d1744b5b89b9b5c223555d introduced a buglet while
cloning from a remote URL; we forgot to squelch the unnecessary
error message when we try to cd to the given "remote" name,
in order to see if it is a local directory.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
Tero Roponen <teanropo@jyu.fi> writes:
> the latest git seems to output a warning every time I
> try to clone a repository that is not local:
>
> $ git --version
> git version 1.5.2.rc3.27.g43d151
>
> $ git clone git://git.kernel.org/pub/scm/git/git.git
> /usr/local/bin/git-clone: line 23: cd: git://git.kernel.org/pub/scm/git/git.git: No such file or directory
Yup, thankfully that is harmless but it is ugly and wrong
nevertheless. Thanks for the report.
git-clone.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-clone.sh b/git-clone.sh
index 70374aa..fdd354f 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -22,10 +22,10 @@ get_repo_base() {
cd "`/bin/pwd`" &&
cd "$1" &&
{
- cd .git 2>/dev/null
+ cd .git
pwd
}
- )
+ ) 2>/dev/null
}
if [ -n "$GIT_SSL_NO_VERIFY" ]; then
--
1.5.2.rc3.27.g43d151
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-05-14 21:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-14 15:41 git-clone tries to cd to a remote repository Tero Roponen
2007-05-14 21:25 ` [PATCH] Fix git-clone buglet for remote case Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).