git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Humble request of 'git' developers + [PATCH] Slight enhancement of GIT wrapper

From
PPPavel Pisa <pisa@cmp.felk.cvut.cz>
Date
Apr 23, 2005, 23:47 UTC
Message-ID
<200504240147.29642.pisa@cmp.felk.cvut.cz>
Hello All,

I am resending patch from 13 April which I have send Petr Baudis. He has said, that he combines best ideas from more similar patches but he has not found time for that probably. It is updated according his and Johannes Schindelin's remarks.

It enables to move all growing number of git scripts and programs to the any directory out of the search path. Actually only "git" script needs to be linked symbolically to some directory on the search path. This solution worked for me with many versions of "git-pasky".

I would vote for this solution and for single public exposed multiplexer executable script. It is how big portable place independent projects solve hiding of garbage from the search path.

Best wishes
                Pavel Pisa
        e-mail: pisa@cmp.felk.cvut.cz
        www:    http://cmp.felk.cvut.cz/~pisa
        work:   http://www.pikron.com
Slight enhancement of GIT wrapper

Git multiplexer and scripts can reside in non PATH directories and linking git multiplexer into some searchables dirs makes the trick.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>

--- git.orig 2005-04-24 00:12:56.000000000 +0200 +++ git 2005-04-24 01:28:01.000000000 +0200

@@ -17,6 +17,28 @@
 	exit 1
 }
 
+if [ -z "$GIT_TOOLS_DIR" ] ; then
+	GIT_MUXBINARY_DIR="$(dirname "$0")"
+	if [ -h "$0" ]; then
+		#GIT_TOOLS_DIR="$(ls -l "$0" | sed 's/^.*-> *\(.*\) *$/\1/')"
+		GIT_TOOLS_DIR="$(ls -L "$0")"
+	        GIT_TOOLS_DIR="$(dirname "$GIT_TOOLS_DIR")"
+		GIT_TOOLS_DIR="$(cd "$GIT_MUXBINARY_DIR" ; cd "$GIT_TOOLS_DIR" ; pwd )"
+	else
+		GIT_TOOLS_DIR="$(cd "$GIT_MUXBINARY_DIR" ; pwd )"
+	fi
+
+	if [ -z "$(echo :$PATH: | sed -n -e 's#:'"$GIT_TOOLS_DIR"':#yes#p' )" ] ; then
+		export PATH="$GIT_TOOLS_DIR:$PATH"
+	fi
+
+	export GIT_TOOLS_DIR
+fi
+
+#echo GIT_TOOLS_DIR=$GIT_TOOLS_DIR
+#echo PATH=$PATH
+#echo CWD=$(pwd)
+#exit 
 
 help () {
 	cat <<__END__
Message 1 of 1 in “Re: Humble request of 'git' developers + [PATCH] Slight enhancement of GIT wrapper”
  1. Pavel PisaApr 23, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.