Re: Questions/investigations on git-subtree and tags

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

 



----- Mail original -----
> Jeremy Rosen <jeremy.rosen@xxxxxxxxxxx> writes:
> 
> > 506,513c506,507
> > < 		case "$2" in
> > < 		*\**) # Avoid pulling in multiple branches
> > < 			die "'$2' contains a wildcard"
> > < 			;;
> > < 		*:*) # Don't create a local branch for the subtree
> > < 			die "'$2' contains a local branch name"
> > < 			;;
> > < 		esac
> > ---
> >> 		git ls-remote --exit-code $1 $2 ||
> 
> You would need to quote $1 and $2 properly to prevent the shell from
> splitting them into words, no?
> 

yes... I'm not very good at shell programming, good catch

> >> 		die "'$2' is not a correct reference on '$1'"
> 
> > 535c529
> > < 	revs=$(git rev-parse $default --revs-only "$@") || exit $?
> > ---
> >> 	revs=$(git rev-parse $default --revs-only "$1^{commit}") || exit
> >> 	$?
> 
> Is it guaranteed that your $# is 1 at this point, or is it something
> you would also need to check here, or perhaps in the caller of this
> function (I cannot tell offhand in a patch without any context)?
> 

I have checked the call sites and yes we can only have one arguement at
this point. so the $@ to $1 is more about future-proofing and readability


thx for proofreading
--
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]