All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Nanako Shiraishi <nanako3@bluebottle.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Cloning from a repo without "current branch"
Date: Sat, 16 Jun 2007 20:41:39 -0700	[thread overview]
Message-ID: <7vbqff1c3w.fsf@assigned-by-dhcp.pobox.com> (raw)
In-Reply-To: 200706162226.l5GMQBss004492@mi0.bluebottle.com

Nanako Shiraishi <nanako3@bluebottle.com> writes:

> diff --git a/git-clone.sh b/git-clone.sh
> index 3a41062..bd44ce1 100755
> --- a/git-clone.sh
> +++ b/git-clone.sh
> @@ -377,6 +377,13 @@ then
>  		)
>  	)
>  
> +	# Upstream URL
> +	git-config remote."$origin".url "$repo" &&
> +
> +	# Set up the mappings to track the remote branches.
> +	git-config remote."$origin".fetch \
> +		"+refs/heads/*:$remote_top/*" '^$' &&
> +
>  	# Write out remote.$origin config, and update our
> "$head_points_at".
>  	case "$head_points_at" in
>  	?*)

Whitespace breakage?

> @@ -384,21 +391,20 @@ then
>  		git-symbolic-ref HEAD "refs/heads/$head_points_at" &&
>  
>  		# Tracking branch for the primary branch at the remote.
> -		origin_track="$remote_top/$head_points_at" &&
>  		git-update-ref HEAD "$head_sha1" &&
>  
> -		# Upstream URL
> -		git-config remote."$origin".url "$repo" &&
> -
> -		# Set up the mappings to track the remote branches.
> -		git-config remote."$origin".fetch \
> -			"+refs/heads/*:$remote_top/*" '^$' &&
>  		rm -f "refs/remotes/$origin/HEAD"
>  		git-symbolic-ref "refs/remotes/$origin/HEAD" \
>  			"refs/remotes/$origin/$head_points_at" &&
>  
>  		git-config branch."$head_points_at".remote "$origin" &&
>  		git-config branch."$head_points_at".merge
> "refs/heads/$head_points_at"
> +		;;

Again...?

> +	'')
> +		# Source had detached HEAD pointing nowhere
> +		git-update-ref --no-deref HEAD "$head_sha1" &&
> +		rm -f "refs/remotes/$origin/HEAD"
> +		;;
>  	esac
>  
>  	case "$no_checkout" in
> -- 
> 1.5.2

  reply	other threads:[~2007-06-17  3:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-16 22:26 [PATCH] Cloning from a repo without "current branch" Nanako Shiraishi
2007-06-17  3:41 ` Junio C Hamano [this message]
2007-06-20 21:50   ` Nanako Shiraishi
2007-06-20 22:29     ` Junio C Hamano
     [not found] ` <7vk5tx5333.fsf@assigned-by-dhcp.pobox.com>
2007-06-21  5:01   ` [PATCH] git-gui: use "blame -w -C -C" for "where did it come from, originally?" Shawn O. Pearce
2007-06-21 19:39     ` Linus Torvalds
2007-06-21 19:47       ` Linus Torvalds
2007-06-22  3:34         ` Shawn O. Pearce

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=7vbqff1c3w.fsf@assigned-by-dhcp.pobox.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=nanako3@bluebottle.com \
    /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.