Akim Demaille wrote:
> Le 29 juil. 2012 à 20:11, Jim Meyering a écrit :
>
>>> - $(emit-commit-log) > .ci-msg
>>> - $(VC) commit -F .ci-msg -a
>>> - rm .ci-msg
>>> + $(emit-commit-log) \
>>> + | (cd $(srcdir) && $(VC) commit -F - -a)
>>
>> I do like avoiding the temporary file, but this induces a down side:
>> with this patch there would be no build failure when emit-commit-log fails.
>> What do you think?
>
> I guess that in that case the message will most probably be
> empty, and git will fail, but there's no guarantee that the
> message will really be empty :(
>
> If you think it is ok to create .ci-msg in $srcdir, then
> that's another possible path to address this issue.
Saving the commit message in a variable should do what we want:
msg=$$(emit-commit-log) || exit 1; \
(cd $(srcdir) && $(VC) commit -m "$$msg" -a)