Re: [RFC/PATCH] Re: git submodule -b ... of current HEAD fails

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

 



On Thu, Dec 02, 2010 at 08:16:21PM -0500, Mark Levedahl wrote:
> On 12/02/2010 04:11 PM, Jens Lehmann wrote:
> > Nope, these lines date back to the time before I got involved in the
> > submodule business ... Seems like this "git checkout" was added in
> > March 2008 by Mark Levedahl (CCed), maybe he can shed some light on
> > that.
> >
> > But to me your change looks good, so feel free to add:
> > Acked-by: Jens Lehmann<Jens.Lehmann@xxxxxx>
> >
> >
> >> diff --git a/git-submodule.sh b/git-submodule.sh
> >> index 33bc41f..6242d7f 100755
> >> --- a/git-submodule.sh
> >> +++ b/git-submodule.sh
> >> @@ -241,7 +241,7 @@ cmd_add()
> >>   			# ash fails to wordsplit ${branch:+-b "$branch"...}
> >>   			case "$branch" in
> >>   			'') git checkout -f -q ;;
> >> -			?*) git checkout -f -q -b "$branch" "origin/$branch" ;;
> >> +			?*) git checkout -f -q -B "$branch" "origin/$branch" ;;
> >>   			esac
> >>   		) || die "Unable to checkout submodule '$path'"
> >>   	fi
> >>
> These lines were actually added by Ben Jackson in commit ea10b60c91 in 
> 2009, long after I last touched that module.

I didn't mean to change any functionality -- I just wanted to fix a
portability problem (/bin/sh is ash on FreeBSD, hence the comment at the
top of the context).  Looks like `checkout -B' (capital B) didn't even
exist at that time.  Seems reasonable, though.

-- 
Ben Jackson AD7GD
<ben@xxxxxxx>
http://www.ben.com/
--
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]