git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Suprising error message from "git clone"
@ 2007-08-20 14:45 Matthieu Moy
  2007-08-20 20:40 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Matthieu Moy @ 2007-08-20 14:45 UTC (permalink / raw)
  To: git

Hi,

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
114 blocks
$ 

I understand that git found the path to be local, and tried to
hardlink, but it shouldn't say "-l asked", since I didn't ask for it.

Either the message should be changed to stg like "Warning: cannot
hardlink to %s" or it should just be skipped if -l was not actually
provided.

-- 
Matthieu

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Suprising error message from "git clone"
  2007-08-20 14:45 Suprising error message from "git clone" Matthieu Moy
@ 2007-08-20 20:40 ` Junio C Hamano
  2007-08-20 21:13   ` Matthieu Moy
  0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2007-08-20 20:40 UTC (permalink / raw)
  To: Matthieu Moy; +Cc: git

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 &&

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: Suprising error message from "git clone"
  2007-08-20 20:40 ` Junio C Hamano
@ 2007-08-20 21:13   ` Matthieu Moy
  2007-08-20 21:25     ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Matthieu Moy @ 2007-08-20 21:13 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Junio C Hamano <gitster@pobox.com> writes:

> Untested but something like this should suffice...

Jest tested, it works fine.

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

Err, what's the problem with it? I don't wish to receive duplicate,
and I ask your mailer not to do so. I don't care too much if the
header is not honnored, but what you have to do is just to followup
without bothering about it.

>  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 &&
>
>

-- 
Matthieu

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Suprising error message from "git clone"
  2007-08-20 21:13   ` Matthieu Moy
@ 2007-08-20 21:25     ` Junio C Hamano
  0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2007-08-20 21:25 UTC (permalink / raw)
  To: Matthieu Moy; +Cc: git

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

> Junio C Hamano <gitster@pobox.com> writes:
>
>> Untested but something like this should suffice...
>
> Jest tested, it works fine.

Thanks.

>> By the way, could you possibly drop Mail-Followup-To: please?
>
> Err, what's the problem with it? I don't wish to receive duplicate,
> and I ask your mailer not to do so. I don't care too much if the
> header is not honnored, but what you have to do is just to followup
> without bothering about it.

For example, your response had this:

    Mail-Followup-To: Junio C Hamano <gitster@pobox.com>,
	    git <git@vger.kernel.org>

Suppose somebody else who read your message on the git list has
something to say to _YOU_.  Maybe he is pointing out some of the
problems in _your_ thinking.  He may not mind me hearing what he
tells you, but he is primarily talking to you.

Although in practice I tend to pay attention to whatever is said
on the git mailing list, I certainly do not want _my_ address on
the To: header of such a response.  He wants to talk to _you_,
not me, and I process mails addressed "To: " me, and then only
when I have enough time to do so move on to other messages.

You either (1) stole time from me by forcing his message
addressed "To: " me, or (2) if the person who responded to your
message were kind and careful enough to "fix" the header so that
the message is addressed to you and demoting me to the Cc: list,
then you stole time from him.

With (1) you are being rude against me, and with (2) you are
being rude against whoever responds to you.

Please don't.

Filtering duplicates on the receiving end in your mailbox should
not be too much of a hassle, either.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-08-20 21:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-20 14:45 Suprising error message from "git clone" Matthieu Moy
2007-08-20 20:40 ` Junio C Hamano
2007-08-20 21:13   ` Matthieu Moy
2007-08-20 21:25     ` 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).