I'm terribly late to the party, seeing as this is already in next, but:
Jeff King [off-list ref] writes:
This is basically a fancy way of saying "git/$GIT_VERSION",
except that it is overridable at build-time and through the
environment. Which means that people who don't want to
advertise their git version (for privacy or security
reasons) can tweak it.
...
+GIT_USER_AGENT = git/$(GIT_VERSION)
...
+GIT_USER_AGENT_SQ = $(subst ','\'',$(GIT_USER_AGENT))
+GIT_USER_AGENT_CQ = "$(subst ",\",$(subst \,\\,$(GIT_USER_AGENT)))"
+GIT_USER_AGENT_CQ_SQ = $(subst ','\'',$(GIT_USER_AGENT_CQ))
+BASIC_CFLAGS += -DGIT_USER_AGENT='$(GIT_USER_AGENT_CQ_SQ)'
Unless the user manually sets GIT_USER_AGENT, This forces a full rebuild
due to changed CFLAGS whenever the version changes. Can you make it so
that only version.o needs to be rebuilt, as with the normal git version
string?
--
Thomas Rast
trast@{inf,student}.ethz.ch