Re: Questions/investigations on git-subtree and tags
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 8, 2013, 17:23 UTC
- Message-ID
- <7vboathkla.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <349468457.245193.1362760197563.JavaMail.root@openwide.fr>
Jeremy Rosen <jeremy.rosen@openwide.fr> writes:
Show 11 quoted lines
> 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?
>> 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)?