From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.176.0/21 X-Spam-Status: No, score=-3.5 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MSGID_FROM_MTA_HEADER,RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 From: Han-Wen Nienhuys Subject: Re: bug: git-sh-setup should not be in $PATH Date: Wed, 06 Dec 2006 13:34:04 +0100 Message-ID: <4576B8BC.8040107@xs4all.nl> References: Reply-To: hanwen@xs4all.nl Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit NNTP-Posting-Date: Wed, 6 Dec 2006 12:34:08 +0000 (UTC) Cc: git@vger.kernel.org Return-path: Envelope-to: gcvg-git@gmane.org User-Agent: Thunderbird 1.5.0.8 (X11/20061107) Original-Newsgroups: gmane.comp.version-control.git In-Reply-To: X-Virus-Scanned: by XS4ALL Virus Scanner Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: Received: from vger.kernel.org ([209.132.176.167]) by dough.gmane.org with esmtp (Exim 4.50) id 1GrvyN-0002Ao-Qd for gcvg-git@gmane.org; Wed, 06 Dec 2006 13:34:04 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760555AbWLFMd7 (ORCPT ); Wed, 6 Dec 2006 07:33:59 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760557AbWLFMd6 (ORCPT ); Wed, 6 Dec 2006 07:33:58 -0500 Received: from smtp-vbr9.xs4all.nl ([194.109.24.29]:3537 "EHLO smtp-vbr9.xs4all.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760555AbWLFMd5 (ORCPT ); Wed, 6 Dec 2006 07:33:57 -0500 Received: from [192.168.123.187] (muurbloem.xs4all.nl [213.84.26.127]) (authenticated bits=0) by smtp-vbr9.xs4all.nl (8.13.8/8.13.8) with ESMTP id kB6CXsAZ069443 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 6 Dec 2006 13:33:54 +0100 (CET) (envelope-from hanwen@xs4all.nl) To: Johannes Schindelin Sender: git-owner@vger.kernel.org Johannes Schindelin escreveu: > Hi, > > On Wed, 6 Dec 2006, Han-Wen Nienhuys wrote: > >> I often install tools locally so I can run SVN/CVS/etc versions >> in my own account. To do this, I install into >> >> $HOME/usr/pkg/PACKAGE > > Why not just set > > $ export GIT_EXEC_PATH=$HOME/usr/pkg/git > $ export PATH=$PATH:$GIT_EXEC_PATH > > ? Because it requires brain cycles from my part. I rather spend those constructively. GIT is the only package I've seen in a long time that breaks this setup. Here is the patch that I proposed >From 988813912c4c7b310c489bfffa1b81e2663b7b6f Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Wed, 6 Dec 2006 13:27:16 +0100 Subject: [PATCH] Install git-sh-setup.sh into $(prefix)/share/git-core. Call with explicit path. Signed-off-by: Han-Wen Nienhuys --- Makefile | 10 ++++++++-- git-am.sh | 2 +- git-applymbox.sh | 2 +- git-applypatch.sh | 2 +- git-bisect.sh | 2 +- git-checkout.sh | 2 +- git-clean.sh | 2 +- git-commit.sh | 2 +- git-fetch.sh | 2 +- git-instaweb.sh | 2 +- git-lost-found.sh | 2 +- git-merge.sh | 2 +- git-pull.sh | 2 +- git-quiltimport.sh | 2 +- git-rebase.sh | 2 +- git-repack.sh | 2 +- git-request-pull.sh | 2 +- git-reset.sh | 2 +- git-resolve.sh | 2 +- git-revert.sh | 2 +- git-tag.sh | 2 +- git-verify-tag.sh | 2 +- 22 files changed, 29 insertions(+), 23 deletions(-) diff --git a/Makefile b/Makefile index a1861de..cb9b745 100644 --- a/Makefile +++ b/Makefile @@ -116,8 +116,10 @@ STRIP ?= strip prefix = $(HOME) bindir = $(prefix)/bin +datadir = $(prefix)/share +GIT_datadir = $(datadir)/git-core gitexecdir = $(bindir) -template_dir = $(prefix)/share/git-core/templates/ +template_dir = $(GIT_datadir)/templates/ # DESTDIR= # default configuration for gitweb @@ -166,7 +168,7 @@ SCRIPT_SH = \ git-merge-one-file.sh git-parse-remote.sh \ git-pull.sh git-rebase.sh \ git-repack.sh git-request-pull.sh git-reset.sh \ - git-resolve.sh git-revert.sh git-sh-setup.sh \ + git-resolve.sh git-revert.sh \ git-tag.sh git-verify-tag.sh \ git-applymbox.sh git-applypatch.sh git-am.sh \ git-merge.sh git-merge-stupid.sh git-merge-octopus.sh \ @@ -550,6 +552,7 @@ endif # Shell quote (do not use $(call) to accommodate ancient setups); SHA1_HEADER_SQ = $(subst ','\'',$(SHA1_HEADER)) +GIT_datadir_SQ = $(subst ','\'',$(GIT_datadir)) DESTDIR_SQ = $(subst ','\'',$(DESTDIR)) bindir_SQ = $(subst ','\'',$(bindir)) @@ -604,6 +607,7 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \ -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ + -e 's!@@GIT_datadir@@!$(GIT_datadir)!g' \ -e 's/@@NO_CURL@@/$(NO_CURL)/g' \ $@.sh >$@+ chmod +x $@+ @@ -816,6 +820,8 @@ install: all '$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X'; \ fi $(foreach p,$(BUILT_INS), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;) + $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(GIT_datadir_SQ)' + $(INSTALL) -m755 git-sh-setup.sh '$(DESTDIR_SQ)$(GIT_datadir_SQ)' install-doc: $(MAKE) -C Documentation install diff --git a/git-am.sh b/git-am.sh index afe322b..b9dfcf0 100755 --- a/git-am.sh +++ b/git-am.sh @@ -5,7 +5,7 @@ USAGE='[--signoff] [--dotest=] [--utf8] [--binary] [--3way] [--interactive] [--whitespace=