Thread (6 messages) flat view 6 messages, 2 authors, 2016-06-15

Re: [PATCH 2/4] version: add git_user_agent function

From: Thomas Rast <hidden>
Date: 2016-06-15 22:54:08

Possibly related (same subject, not in this thread)

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help