Re: [PATCH v14 04/13] ref-filter: implement an `align` atom

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

 



Eric Sunshine <sunshine@xxxxxxxxxxxxxx> 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 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]