Re: [PATCH] Only use ETC_GITCONFIG=$(prefix)/etc/gitconfig ifeq ($(prefix),$(HOME))

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] Only use ETC_GITCONFIG=$(prefix)/etc/gitconfig ifeq ($(prefix),$(HOME))

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:06

Junio C Hamano [off-list ref] writes:
Josh Triplett [off-list ref] writes:
quoted
ETC_GITCONFIG defaults to $(prefix)/etc/gitconfig, so if you just set
prefix=/usr or prefix=/usr/local, you end up with a git that looks in
/usr/etc/gitconfig or /usr/local/etc/gitconfig.  That seems rather suboptimal.

Use ifeq in the Makefile to set ETC_GITCONFIG=/etc/gitconfig unless the prefix
points to $HOME .
I personally have four installations of git under $HOME by
setting prefix to $HOME/git-{maint,master,next,pu}.  I would
rather not see this to break, as I suspect there are other
people who depend on this behaviour.
Also what happens to people who use "prefix=/usr/local"?

Re: [PATCH] Only use ETC_GITCONFIG=$(prefix)/etc/gitconfig ifeq ($(prefix),$(HOME))

From: Sergio Callegari <hidden>
Date: 2016-06-15 22:43:06

Junio C Hamano <junkio <at> cox.net> writes:
quoted
Josh Triplett <josh <at> freedesktop.org> writes:
quoted
ETC_GITCONFIG defaults to $(prefix)/etc/gitconfig, so if you just set
prefix=/usr or prefix=/usr/local, you end up with a git that looks in
/usr/etc/gitconfig or /usr/local/etc/gitconfig.  That seems rather
suboptimal.
quoted
quoted
Also what happens to people who use "prefix=/usr/local"?
 
Could it be better to set ETC_GITCONFIG=/etc/gitconfig /only/ if prefix is /usr?

These would possibly make all people who have git in /usr/local or in /opt/Git
or in /home happier...

If I am not wrong, /usr is the only prefix, where, for historical reasons
there is no /usr/etc but /etc is used.  Having /usr/local/etc does not seem that
bad. And /opt/Git/etc appears surely ok.

Sergio
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help