Re: `git describe` in an export-subst format string?

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

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> John Gallagher <johnkgallagher@xxxxxxxxx> writes:
>
>> The actual thing I want to do is
>> something like this:
>>
>>   static const char *project_version = "$Format:...$";
>>
>> where "..." is something that `git archive` will replace with the
>> output of `git describe`,...
>
> You need to find an appropriate pair of placeholders that can
> represent "git describe $it" and "git describe --contains $it".
>
> I am tempted to suggest a more generalized way that is not limited
> to describe at all, perhaps like this:
>
>     $ git show --format='%x( git describe %H )'
>     $ git show --format='%x( git describe --contains %H )'

Just in case anybody takes it too seriously, this particular
implementaiton will never be acceptable at least for use in
"$Format:" of export-subst.

I am "tempted to" suggest, but am not crazy enough to actually doing
so ;-).
--
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]