In Polchinski's String theory book, Vol 1., in chapter 1, p. 18, he is deriving the Lagrangian in the light cone gauge (that's not necessary to know in order to answer this question), and he gets
$$L~=~L_{ok}+\int_{0}^{\ell}d\sigma \gamma_{\tau\sigma}\partial_{\sigma}Y^- ,\tag{1.3.11}$$
where
$$Y^-(\tau,\sigma)~=~X^-(\tau,\sigma)-x^-(\tau) \tag{1.3.12b}$$
and
$$x^-(\tau)~=~\frac{1}{\ell}\int_{0}^{\ell}\! d\sigma~ X^-(\tau,\sigma),\tag{1.3.12a}$$
so
$$\langle Y^-\rangle_{\sigma}~=~0 .$$
Now he makes the variation of the Lagrangian respect to $Y^-$:
$$\delta L_{Y^-}~=~\int_{0}^{\ell}d\sigma \gamma_{\tau\sigma}\delta(\partial_{\sigma}Y^-)~=~0$$
than he says that the variation yields
$$\partial^2_{\sigma}\gamma_{\tau\sigma}~=~0$$
where the extra $\partial_{\sigma}$ is due to the fact that
$$\langle Y^-\rangle_{\sigma} ~=~\int_{0}^{\ell}d\sigma Y^-(\tau,\sigma)~=~0 $$
I don't get why this fact should lead to an extra derivative, can anyone help? I "suspect" it has something to do with the fact that $Y^-$ is not positive definite (?)