All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Matthieu Moy <Matthieu.Moy@imag.fr>
Cc: git <git@vger.kernel.org>
Subject: Re: Suprising error message from "git clone"
Date: Mon, 20 Aug 2007 13:40:56 -0700	[thread overview]
Message-ID: <7vr6lyrlbb.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <vpqwsvqmfhw.fsf@bauges.imag.fr> (Matthieu Moy's message of "Mon, 20 Aug 2007 16:45:31 +0200")

Matthieu Moy <Matthieu.Moy@imag.fr> writes:

> I got a suprising error message:
>
> $ cd /tmp/
> $ git clone ~/some/repository
> Initialized empty Git repository in /tmp/repository/.git/
> Warning: -l asked but cannot hardlink to /home/moy/some/repository/.git

Yup, we already discussed when we switched to defaulting to -l,
but nobody cared enough to get around to patch the warning.

Untested but something like this should suffice...

By the way, could you possibly drop Mail-Followup-To: please?

 git-clone.sh |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/git-clone.sh b/git-clone.sh
index e4a9ac4..18003ab 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -99,6 +99,7 @@ origin_override=
 use_separate_remote=t
 depth=
 no_progress=
+local_explicitly_asked_for=
 test -t 1 || no_progress=--no-progress
 while
 	case "$#,$1" in
@@ -109,6 +110,7 @@ while
 	*,--na|*,--nak|*,--nake|*,--naked|\
 	*,-b|*,--b|*,--ba|*,--bar|*,--bare) bare=yes ;;
 	*,-l|*,--l|*,--lo|*,--loc|*,--loca|*,--local)
+	  local_explicitly_asked_for=yes
 	  use_local_hardlink=yes ;;
 	*,--no-h|*,--no-ha|*,--no-har|*,--no-hard|*,--no-hardl|\
 	*,--no-hardli|*,--no-hardlin|*,--no-hardlink|*,--no-hardlinks)
@@ -281,7 +283,8 @@ yes)
 			then
 				rm -f "$GIT_DIR/objects/sample"
 				l=l
-			else
+			elif test -n "$local_explicitly_asked_for"
+			then
 				echo >&2 "Warning: -l asked but cannot hardlink to $repo"
 			fi
 		fi &&

  reply	other threads:[~2007-08-20 20:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-20 14:45 Suprising error message from "git clone" Matthieu Moy
2007-08-20 20:40 ` Junio C Hamano [this message]
2007-08-20 21:13   ` Matthieu Moy
2007-08-20 21:25     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vr6lyrlbb.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Matthieu.Moy@imag.fr \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.