Eric Sunshine <sunsh...@sunshineco.com> writes:

> With the disclaimer that I wasn't following the quoting discussion
> closely: Is this condition going to be sufficient for all cases, such
> as an %(if:) atom? That is, if you have:
>
>     %(if:notempty)%(bloop)%(then) --option=%(bloop)%(end)
>
> isn't the intention that, %(bloop) within the %(then) section should
> be quoted but not the literal "--option="?

I think you'll see that the intention of the above is to quote the
entirty of the result of %(if...)...%(end) if you read the previous
discussion.  The "quoting" is used when you say you are making --format
write a script in specified programming language, e.g.

        for-each-ref --shell --format='
                a=%(atom) b=%(if...)...%(end)
                do interesting things using $a and $b here
        ' | sh

You are correct to point out in the earlier part of your message I
am responding to that %(align) is not special and any nested thing
including %(if) will uniformly trigger the same "usually each atom
is quoted separately, but with this opening atom, everything up to
the matching end atom is evaluated first and then the result is
quoted" logic.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to