Re: [PATCH] git-clone.sh: properly configure remote even if remote's head is dangling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, 20 Feb 2008, Gerrit Pape wrote:

> When cloning a remote repository which's HEAD refers to a nonexistent 
> ref, git-clone cloned all existing refs, but failed to write the 
> configuration for 'remote'.  Now it detects the dangling remote HEAD, 
> refuses to checkout any local branch since HEAD refers to nowhere, but 
> properly writes the configuration for 'remote', so that subsequent 'git 
> fetch's don't fail.

I like your reasoning, and your patch.  Except maybe...

> diff --git a/t/t5701-clone-local.sh b/t/t5701-clone-local.sh
> index 822ac8c..59a165a 100755
> --- a/t/t5701-clone-local.sh
> +++ b/t/t5701-clone-local.sh
> @@ -63,4 +63,12 @@ test_expect_success 'Even without -l, local will make a hardlink' '
>  	test 0 = $copied
>  '
>  
> +test_expect_success 'local clone of repo with nonexistent ref in HEAD' '
> +	cd "$D" &&

... making this a subshell would be nice, so that subsequent tests start 
out from trash/ again?

Ciao,
Dscho
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux