git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeremy Rosen <jeremy.rosen@openwide.fr>
To: Junio C Hamano <gitster@pobox.com>
Cc: Paul Campbell <pcampbell@kemitix.net>, git@vger.kernel.org
Subject: Re: Questions/investigations on git-subtree and tags
Date: Fri, 8 Mar 2013 18:29:31 +0100 (CET)	[thread overview]
Message-ID: <886271566.251606.1362763771332.JavaMail.root@openwide.fr> (raw)
In-Reply-To: <7vboathkla.fsf@alter.siamese.dyndns.org>

----- Mail original -----
> Jeremy Rosen <jeremy.rosen@openwide.fr> 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

  reply	other threads:[~2013-03-08 17:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1492019317.191838.1362650820122.JavaMail.root@openwide.fr>
2013-03-07 10:25 ` Questions/investigations on git-subtree and tags Jeremy Rosen
2013-03-07 11:00   ` Paul Campbell
2013-03-07 11:05     ` Jeremy Rosen
2013-03-07 12:02       ` Paul Campbell
2013-03-07 12:50         ` Jeremy Rosen
2013-03-07 15:00           ` Paul Campbell
2013-03-07 15:15             ` Jeremy Rosen
2013-03-07 15:29               ` Paul Campbell
2013-03-07 16:09                 ` Jeremy Rosen
2013-03-08 16:29                   ` Jeremy Rosen
2013-03-08 17:23                     ` Junio C Hamano
2013-03-08 17:29                       ` Jeremy Rosen [this message]
2013-03-12 10:02                         ` Jeremy Rosen
2013-03-12 23:57                           ` Paul Campbell

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=886271566.251606.1362763771332.JavaMail.root@openwide.fr \
    --to=jeremy.rosen@openwide.fr \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pcampbell@kemitix.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).