{"thread":{"id":"43336","subject":"Re: [PATCH] Install git-sh-setup.sh into $(prefix)/share/git-core. Call with explicit path.","startedAt":"2006-12-08T17:13:50Z","lastAt":"2006-12-10T00:50:02Z","messageCount":9,"participants":["Junio C Hamano","Nguyen Thai Ngoc Duy","Han-Wen Nienhuys","Eric Wong"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"294775","messageId":"elc6g3$v1m$1@sea.gmane.org","threadId":"43336","inReplyTo":null,"subject":"[PATCH] Install git-sh-setup.sh into $(prefix)/share/git-core. Call with explicit path.","fromName":"Han-Wen Nienhuys","fromEmail":"hanwen@xs4all.nl","sentAt":"2006-12-08T17:13:50Z","receivedAt":"2006-12-08T17:13:50Z","isPatch":true,"sender":{"key":"hanwen@google.com","avatar":"https://avatars.githubusercontent.com/u/31547?v=4"},"body":"\ngit-sh-setup isn't a 'normal' binary, in that it should be called by\nbash only and not run in a subshell. Therefore, it should not be installed\nin a executable directory, but rather in $prefix/share/git-core/\n\n\nFrom 4cefe86667d01ecc912c1f9d8b78c831c33792a1 Mon Sep 17 00:00:00 2001\nFrom: Han-Wen Nienhuys <hanwen@xs4all.nl>\nDate: Wed, 6 Dec 2006 13:27:16 +0100\nSubject: \n\nSigned-off-by: Han-Wen Nienhuys <hanwen@xs4all.nl>\n---\n Makefile            |   10 ++++++++--\n git-am.sh           |    2 +-\n git-applymbox.sh    |    2 +-\n git-applypatch.sh   |    2 +-\n git-bisect.sh       |    2 +-\n git-checkout.sh     |    2 +-\n git-clean.sh        |    2 +-\n git-commit.sh       |    2 +-\n git-fetch.sh        |    2 +-\n git-instaweb.sh     |    2 +-\n git-lost-found.sh   |    2 +-\n git-merge.sh        |    2 +-\n git-pull.sh         |    2 +-\n git-quiltimport.sh  |    2 +-\n git-rebase.sh       |    2 +-\n git-repack.sh       |    2 +-\n git-request-pull.sh |    2 +-\n git-reset.sh        |    2 +-\n git-resolve.sh      |    2 +-\n git-revert.sh       |    2 +-\n git-tag.sh          |    2 +-\n git-verify-tag.sh   |    2 +-\n 22 files changed, 29 insertions(+), 23 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex a1861de..cb9b745 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -116,8 +116,10 @@ STRIP ?= strip\n \n prefix = $(HOME)\n bindir = $(prefix)/bin\n+datadir = $(prefix)/share\n+GIT_datadir = $(datadir)/git-core\n gitexecdir = $(bindir)\n-template_dir = $(prefix)/share/git-core/templates/\n+template_dir = $(GIT_datadir)/templates/\n # DESTDIR=\n \n # default configuration for gitweb\n@@ -166,7 +168,7 @@ SCRIPT_SH = \\\n \tgit-merge-one-file.sh git-parse-remote.sh \\\n \tgit-pull.sh git-rebase.sh \\\n \tgit-repack.sh git-request-pull.sh git-reset.sh \\\n-\tgit-resolve.sh git-revert.sh git-sh-setup.sh \\\n+\tgit-resolve.sh git-revert.sh \\\n \tgit-tag.sh git-verify-tag.sh \\\n \tgit-applymbox.sh git-applypatch.sh git-am.sh \\\n \tgit-merge.sh git-merge-stupid.sh git-merge-octopus.sh \\\n@@ -550,6 +552,7 @@ endif\n # Shell quote (do not use $(call) to accommodate ancient setups);\n \n SHA1_HEADER_SQ = $(subst ','\\'',$(SHA1_HEADER))\n+GIT_datadir_SQ = $(subst ','\\'',$(GIT_datadir))\n \n DESTDIR_SQ = $(subst ','\\'',$(DESTDIR))\n bindir_SQ = $(subst ','\\'',$(bindir))\n@@ -604,6 +607,7 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh\n \tsed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \\\n \t    -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \\\n \t    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \\\n+\t    -e 's!@@GIT_datadir@@!$(GIT_datadir)!g' \\\n \t    -e 's/@@NO_CURL@@/$(NO_CURL)/g' \\\n \t    $@.sh >$@+\n \tchmod +x $@+\n@@ -816,6 +820,8 @@ install: all\n \t\t\t'$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X'; \\\n \tfi\n \t$(foreach p,$(BUILT_INS), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)\n+\t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(GIT_datadir_SQ)'\n+\t$(INSTALL) -m755 git-sh-setup.sh '$(DESTDIR_SQ)$(GIT_datadir_SQ)'\n \n install-doc:\n \t$(MAKE) -C Documentation install\ndiff --git a/git-am.sh b/git-am.sh\nindex afe322b..b9dfcf0 100755\n--- a/git-am.sh\n+++ b/git-am.sh\n@@ -5,7 +5,7 @@\n USAGE='[--signoff] [--dotest=<dir>] [--utf8] [--binary] [--3way]\n   [--interactive] [--whitespace=<option>] <mbox>...\n   or, when resuming [--skip | --resolved]'\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n git var GIT_COMMITTER_IDENT >/dev/null || exit\n \ndiff --git a/git-applymbox.sh b/git-applymbox.sh\nindex 5569fdc..eaab50d 100755\n--- a/git-applymbox.sh\n+++ b/git-applymbox.sh\n@@ -19,7 +19,7 @@\n ## git-am is supposed to be the newer and better tool for this job.\n \n USAGE='[-u] [-k] [-q] [-m] (-c .dotest/<num> | mbox) [signoff]'\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n git var GIT_COMMITTER_IDENT >/dev/null || exit\n \ndiff --git a/git-applypatch.sh b/git-applypatch.sh\nindex 8df2aee..7ddf5d3 100755\n--- a/git-applypatch.sh\n+++ b/git-applypatch.sh\n@@ -12,7 +12,7 @@\n ##\n \n USAGE='<msg> <patch> <info> [<signoff>]'\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n case \"$#\" in 3|4) ;; *) usage ;; esac\n \ndiff --git a/git-bisect.sh b/git-bisect.sh\nindex 6da31e8..6fa92e2 100755\n--- a/git-bisect.sh\n+++ b/git-bisect.sh\n@@ -10,7 +10,7 @@ git bisect visualize            show bisect status in gitk.\n git bisect replay <logfile>\treplay bisection log\n git bisect log\t\t\tshow bisect log.'\n \n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n sq() {\n \t@@PERL@@ -e '\ndiff --git a/git-checkout.sh b/git-checkout.sh\nindex 737abd0..beea113 100755\n--- a/git-checkout.sh\n+++ b/git-checkout.sh\n@@ -2,7 +2,7 @@\n \n USAGE='[-f] [-b <new_branch>] [-m] [<branch>] [<paths>...]'\n SUBDIRECTORY_OK=Sometimes\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n old_name=HEAD\n old=$(git-rev-parse --verify $old_name 2>/dev/null)\ndiff --git a/git-clean.sh b/git-clean.sh\nindex 3834323..7a7ce6e 100755\n--- a/git-clean.sh\n+++ b/git-clean.sh\n@@ -13,7 +13,7 @@ LONG_USAGE='Clean untracked files from the working directory\n When optional <paths>... arguments are given, the paths\n affected are further limited to those that match them.'\n SUBDIRECTORY_OK=Yes\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n ignored=\n ignoredonly=\ndiff --git a/git-commit.sh b/git-commit.sh\nindex 81c3a0c..5a388f5 100755\n--- a/git-commit.sh\n+++ b/git-commit.sh\n@@ -5,7 +5,7 @@\n \n USAGE='[-a] [-s] [-v] [--no-verify] [-m <message> | -F <logfile> | (-C|-c) <commit>] [-u] [--amend] [-e] [--author <author>] [[-i | -o] <path>...]'\n SUBDIRECTORY_OK=Yes\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n git-rev-parse --verify HEAD >/dev/null 2>&1 || initial_commit=t\n branch=$(GIT_DIR=\"$GIT_DIR\" git-symbolic-ref HEAD)\ndiff --git a/git-fetch.sh b/git-fetch.sh\nindex 4eecf14..efe44ea 100755\n--- a/git-fetch.sh\n+++ b/git-fetch.sh\n@@ -2,7 +2,7 @@\n #\n \n USAGE='<fetch-options> <repository> <refspec>...'\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n . git-parse-remote\n _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'\n _x40=\"$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40\"\ndiff --git a/git-instaweb.sh b/git-instaweb.sh\nindex 16cd351..ae9fbc1 100755\n--- a/git-instaweb.sh\n+++ b/git-instaweb.sh\n@@ -6,7 +6,7 @@ USAGE='[--start] [--stop] [--restart]\n   [--local] [--httpd=<httpd>] [--port=<port>] [--browser=<browser>]\n   [--module-path=<path> (for Apache2 only)]'\n \n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n case \"$GIT_DIR\" in\n /*)\ndiff --git a/git-lost-found.sh b/git-lost-found.sh\nindex b928f2c..5f612f2 100755\n--- a/git-lost-found.sh\n+++ b/git-lost-found.sh\n@@ -2,7 +2,7 @@\n \n USAGE=''\n SUBDIRECTORY_OK='Yes'\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n if [ \"$#\" != \"0\" ]\n then\ndiff --git a/git-merge.sh b/git-merge.sh\nindex a948878..b83b4b9 100755\n--- a/git-merge.sh\n+++ b/git-merge.sh\n@@ -5,7 +5,7 @@\n \n USAGE='[-n] [--no-commit] [--squash] [-s <strategy>] [--reflog-action=<action>] [-m=<merge-message>] <commit>+'\n \n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n LF='\n '\ndiff --git a/git-pull.sh b/git-pull.sh\nindex e23beb6..8c0f292 100755\n--- a/git-pull.sh\n+++ b/git-pull.sh\n@@ -6,7 +6,7 @@\n \n USAGE='[-n | --no-summary] [--no-commit] [-s strategy]... [<fetch-options>] <repo> <head>...'\n LONG_USAGE='Fetch one or more remote refs and merge it/them into the current HEAD.'\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n strategy_args= no_summary= no_commit= squash=\n while case \"$#,$1\" in 0) break ;; *,-*) ;; *) break ;; esac\ndiff --git a/git-quiltimport.sh b/git-quiltimport.sh\nindex 10135da..2f1e7b7 100755\n--- a/git-quiltimport.sh\n+++ b/git-quiltimport.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n USAGE='--dry-run --author <author> --patches </path/to/quilt/patch/directory>'\n SUBDIRECTORY_ON=Yes\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n dry_run=\"\"\n quilt_author=\"\"\ndiff --git a/git-rebase.sh b/git-rebase.sh\nindex 25530df..3220291 100755\n--- a/git-rebase.sh\n+++ b/git-rebase.sh\n@@ -27,7 +27,7 @@ Example:       git-rebase master~1 topic\n        /                   -->           /\n   D---E---F---G master          D---E---F---G master\n '\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n RESOLVEMSG=\"\n When you have resolved this problem run \\\"git rebase --continue\\\".\ndiff --git a/git-repack.sh b/git-repack.sh\nindex f150a55..e85f0b6 100755\n--- a/git-repack.sh\n+++ b/git-repack.sh\n@@ -5,7 +5,7 @@\n \n USAGE='[-a] [-d] [-f] [-l] [-n] [-q] [--window=N] [--depth=N]'\n SUBDIRECTORY_OK='Yes'\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n no_update_info= all_into_one= remove_redundant=\n local= quiet= no_reuse_delta= extra=\ndiff --git a/git-request-pull.sh b/git-request-pull.sh\nindex 4eacc3a..fd02d55 100755\n--- a/git-request-pull.sh\n+++ b/git-request-pull.sh\n@@ -8,7 +8,7 @@ USAGE='<commit> <url> [<head>]'\n LONG_USAGE='Summarizes the changes since <commit> to the standard output,\n and includes <url> in the message generated.'\n SUBDIRECTORY_OK='Yes'\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n revision=$1\n url=$2\ndiff --git a/git-reset.sh b/git-reset.sh\nindex c0feb44..4c4f551 100755\n--- a/git-reset.sh\n+++ b/git-reset.sh\n@@ -1,7 +1,7 @@\n #!/bin/sh\n \n USAGE='[--mixed | --soft | --hard]  [<commit-ish>]'\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n update=\n reset_type=--mixed\ndiff --git a/git-resolve.sh b/git-resolve.sh\nindex 36b90e3..4c2d7da 100755\n--- a/git-resolve.sh\n+++ b/git-resolve.sh\n@@ -10,7 +10,7 @@ echo 'WARNING: Please use git-merge or git-pull instead.' >&2\n sleep 2\n \n USAGE='<head> <remote> <merge-message>'\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n dropheads() {\n \trm -f -- \"$GIT_DIR/MERGE_HEAD\" \\\ndiff --git a/git-revert.sh b/git-revert.sh\nindex 6eab3c7..8a30297 100755\n--- a/git-revert.sh\n+++ b/git-revert.sh\n@@ -18,7 +18,7 @@ case \"$0\" in\n * )\n \tdie \"What are you talking about?\" ;;\n esac\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n no_commit=\n while case \"$#\" in 0) break ;; esac\ndiff --git a/git-tag.sh b/git-tag.sh\nindex d53f94c..a7d6223 100755\n--- a/git-tag.sh\n+++ b/git-tag.sh\n@@ -3,7 +3,7 @@\n \n USAGE='-l [<pattern>] | [-a | -s | -u <key-id>] [-f | -d] [-m <msg>] <tagname> [<head>]'\n SUBDIRECTORY_OK='Yes'\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n message_given=\n annotate=\ndiff --git a/git-verify-tag.sh b/git-verify-tag.sh\nindex 36f171b..d265150 100755\n--- a/git-verify-tag.sh\n+++ b/git-verify-tag.sh\n@@ -2,7 +2,7 @@\n \n USAGE='<tag>'\n SUBDIRECTORY_OK='Yes'\n-. git-sh-setup\n+. @@GIT_datadir@@/git-sh-setup.sh\n \n verbose=\n while case $# in 0) break;; esac\n-- \n1.4.4.1.gc9922-dirty\n\n\n-- \n Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen\n"},{"id":"294473","messageId":"fcaeb9bf0612081111h53699ecbr5fb72e17526993d5@mail.gmail.com","threadId":"43336","inReplyTo":"elc6g3$v1m$1@sea.gmane.org","subject":"Re: [PATCH] Install git-sh-setup.sh into $(prefix)/share/git-core. Call with explicit path.","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2006-12-08T19:11:03Z","receivedAt":"2006-12-08T19:11:03Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On 12/9/06, Han-Wen Nienhuys <hanwen@xs4all.nl> wrote:\n>\n> git-sh-setup isn't a 'normal' binary, in that it should be called by\n> bash only and not run in a subshell. Therefore, it should not be installed\n> in a executable directory, but rather in $prefix/share/git-core/\n\nExecutables should not go to $prefix/share I think. Maybe $prefix/libexec?\nBTW, I think you touched a larger issue: plumbling/porcelain separation.\n-- \n"},{"id":"294874","messageId":"20061208193718.GA11906@soma","threadId":"43336","inReplyTo":"elc6g3$v1m$1@sea.gmane.org","subject":"Re: [PATCH] Install git-sh-setup.sh into $(prefix)/share/git-core. Call with explicit path.","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-12-08T19:37:18Z","receivedAt":"2006-12-08T19:37:18Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Han-Wen Nienhuys <hanwen@xs4all.nl> wrote:\n> \n> git-sh-setup isn't a 'normal' binary, in that it should be called by\n> bash only and not run in a subshell. Therefore, it should not be installed\n> in a executable directory, but rather in $prefix/share/git-core/\n\nThis seems to break existing hooks, or at least old repositories can\nbe stuck using an old version of git-sh-setup in those hooks.\n\nYou could to add GIT_datadir to PATH before invoking hooks for existing\nones to work, or write some sort of conversion script...\n\n> ---\n>  Makefile            |   10 ++++++++--\n>  git-am.sh           |    2 +-\n>  git-applymbox.sh    |    2 +-\n>  git-applypatch.sh   |    2 +-\n>  git-bisect.sh       |    2 +-\n>  git-checkout.sh     |    2 +-\n>  git-clean.sh        |    2 +-\n>  git-commit.sh       |    2 +-\n>  git-fetch.sh        |    2 +-\n>  git-instaweb.sh     |    2 +-\n>  git-lost-found.sh   |    2 +-\n>  git-merge.sh        |    2 +-\n>  git-pull.sh         |    2 +-\n>  git-quiltimport.sh  |    2 +-\n>  git-rebase.sh       |    2 +-\n>  git-repack.sh       |    2 +-\n>  git-request-pull.sh |    2 +-\n>  git-reset.sh        |    2 +-\n>  git-resolve.sh      |    2 +-\n>  git-revert.sh       |    2 +-\n>  git-tag.sh          |    2 +-\n>  git-verify-tag.sh   |    2 +-\n>  22 files changed, 29 insertions(+), 23 deletions(-)\n\nYou shoudl probably change these, too:\n\ntemplates/hooks--pre-applypatch:. git-sh-setup\ntemplates/hooks--applypatch-msg:. git-sh-setup\n\n-- \n"},{"id":"294926","messageId":"7v3b7qi0b4.fsf@assigned-by-dhcp.cox.net","threadId":"43336","inReplyTo":"20061208193718.GA11906@soma","subject":"Re: [PATCH] Install git-sh-setup.sh into $(prefix)/share/git-core. Call with explicit path.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-12-08T20:45:35Z","receivedAt":"2006-12-08T20:45:35Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Wong <normalperson@yhbt.net> writes:\n\n> Han-Wen Nienhuys <hanwen@xs4all.nl> wrote:\n>> \n>> git-sh-setup isn't a 'normal' binary, in that it should be called by\n>> bash only and not run in a subshell. Therefore, it should not be installed\n>> in a executable directory, but rather in $prefix/share/git-core/\n>\n> This seems to break existing hooks, or at least old repositories can\n> be stuck using an old version of git-sh-setup in those hooks.\n\nHonestly speaking, I do not think this patch is worth it.\nPeople who care deeply enough should just use gitexecdir that is\nseparate from bindir.\n\n"},{"id":"294518","messageId":"4579D012.6020605@xs4all.nl","threadId":"43336","inReplyTo":"fcaeb9bf0612081111h53699ecbr5fb72e17526993d5@mail.gmail.com","subject":"Re: [PATCH] Install git-sh-setup.sh into $(prefix)/share/git-core. Call with explicit path.","fromName":"Han-Wen Nienhuys","fromEmail":"hanwen@xs4all.nl","sentAt":"2006-12-08T20:50:26Z","receivedAt":"2006-12-08T20:50:26Z","isPatch":true,"sender":{"key":"hanwen@google.com","avatar":"https://avatars.githubusercontent.com/u/31547?v=4"},"body":"Nguyen Thai Ngoc Duy escreveu:\n> On 12/9/06, Han-Wen Nienhuys <hanwen@xs4all.nl> wrote:\n>>\n>> git-sh-setup isn't a 'normal' binary, in that it should be called by\n>> bash only and not run in a subshell. Therefore, it should not be\n>> installed\n>> in a executable directory, but rather in $prefix/share/git-core/\n> \n> Executables should not go to $prefix/share I think. Maybe $prefix/libexec?\n\nYes, correct. Will change.\n\n\n-- \n Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen\n"},{"id":"295816","messageId":"457AB54B.8070107@xs4all.nl","threadId":"43336","inReplyTo":"7v3b7qi0b4.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Install git-sh-setup.sh into $(prefix)/share/git-core. Call with explicit path.","fromName":"Han-Wen Nienhuys","fromEmail":"hanwen@xs4all.nl","sentAt":"2006-12-09T13:08:27Z","receivedAt":"2006-12-09T13:08:27Z","isPatch":true,"sender":{"key":"hanwen@google.com","avatar":"https://avatars.githubusercontent.com/u/31547?v=4"},"body":"Junio C Hamano escreveu:\n> Eric Wong <normalperson@yhbt.net> writes:\n> \n>> Han-Wen Nienhuys <hanwen@xs4all.nl> wrote:\n>>> git-sh-setup isn't a 'normal' binary, in that it should be called by\n>>> bash only and not run in a subshell. Therefore, it should not be installed\n>>> in a executable directory, but rather in $prefix/share/git-core/\n>> This seems to break existing hooks, or at least old repositories can\n>> be stuck using an old version of git-sh-setup in those hooks.\n> \n> Honestly speaking, I do not think this patch is worth it.\n> People who care deeply enough should just use gitexecdir that is\n> separate from bindir.\n\nAnd how about coding the path of git-sh-setup (in <prefix>/bin/git-sh-setup) \nin the shell scripts? This will ensure that the sh-setup is the one\nfrom the right package, but still retain backward compatibility for \nscripts.\n\n-- \n"},{"id":"294401","messageId":"7v1wn8ah2k.fsf@assigned-by-dhcp.cox.net","threadId":"43336","inReplyTo":"457AB54B.8070107@xs4all.nl","subject":"Re: [PATCH] Install git-sh-setup.sh into $(prefix)/share/git-core. Call with explicit path.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-12-09T21:35:15Z","receivedAt":"2006-12-09T21:35:15Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Han-Wen Nienhuys <hanwen@xs4all.nl> writes:\n\n> And how about coding the path of git-sh-setup (in <prefix>/bin/git-sh-setup) \n> in the shell scripts? This will ensure that the sh-setup is the one\n> from the right package, but still retain backward compatibility for \n> scripts.\n\nHardcoding $(bin)/git-sh-setup is a non-starter; it breaks\nGIT_EXEC_PATH convention to allow users to override it.\n\nYou would need to make sure the following:\n\n - If you are moving git-sh-setup out of the way, I think you\n   would need to do the same for git-parse-remote while you are\n   at it.  There might be other scriptlets whose sole purpose is\n   to be sourced via \".\" (I haven't checked recently).\n\n - It should be arranged so that \"make test\" would test the\n   version from the source tree, even when you have an installed\n   version of git-sh-setup and friends elsewhere on your PATH.\n\n - People who build but do not install should be able to\n   continue using git from the build location with appropriate\n   environment settings (look for place that talks about PATH\n   and GIT_EXEC_PATH in INSTALL -- if you need something else,\n   you should document new requirements there).\n\nI haven't looked closely, but I suspect your patch might have\nbroken the latter two.\n\nHaving said that, I still do not see the point of doing this.\n\nWas there ever a case that you typed git-sh-setup on the command\nline by mistake (in which case it might be a valid desire to\nprevent the mistake from happening again)?  Command complettion\nmight offer git-sh-setup when you say \"git-<TAB>\", which might\nirritate you --- but these days you can use Shawn's completion\nand say \"git <TAB>\" or \"git somecommand<TAB>\", which is way\nnicer, and makes it not really an issue either.\n\nIn other words, I do not know what real problem you are trying\nto solve.\n"},{"id":"297519","messageId":"457B4981.2030408@xs4all.nl","threadId":"43336","inReplyTo":"7v1wn8ah2k.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Install git-sh-setup.sh into $(prefix)/share/git-core. Call with explicit path.","fromName":"Han-Wen Nienhuys","fromEmail":"hanwen@xs4all.nl","sentAt":"2006-12-09T23:40:49Z","receivedAt":"2006-12-09T23:40:49Z","isPatch":true,"sender":{"key":"hanwen@google.com","avatar":"https://avatars.githubusercontent.com/u/31547?v=4"},"body":"Junio C Hamano escreveu:\n> Han-Wen Nienhuys <hanwen@xs4all.nl> writes:\n> \n>> And how about coding the path of git-sh-setup (in <prefix>/bin/git-sh-setup) \n>> in the shell scripts? This will ensure that the sh-setup is the one\n>> from the right package, but still retain backward compatibility for \n>> scripts.\n> \n> Hardcoding $(bin)/git-sh-setup is a non-starter; it breaks\n> GIT_EXEC_PATH convention to allow users to override it.\n\n> In other words, I do not know what real problem you are trying\n> to solve.\n\nThe real problem is that git is nonstandard to wrap around:\nscripts like git-sh-setup need special attention, because they don't work \nwith\n\n  exec /some/where/else/git-sh-setup \"$@\"\n\nI admit is a small problem, but IMO that's not an argument not to solve it.\n\n-- \n"},{"id":"296569","messageId":"7vhcw48thh.fsf@assigned-by-dhcp.cox.net","threadId":"43336","inReplyTo":"457B4981.2030408@xs4all.nl","subject":"Re: [PATCH] Install git-sh-setup.sh into $(prefix)/share/git-core. Call with explicit path.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-12-10T00:50:02Z","receivedAt":"2006-12-10T00:50:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Han-Wen Nienhuys <hanwen@xs4all.nl> writes:\n\n> The real problem is that git is nonstandard to wrap around:\n> scripts like git-sh-setup need special attention, because they don't work \n> with\n>\n>   exec /some/where/else/git-sh-setup \"$@\"\n\nOf course.  Who would want to wrap git-sh-setup that way?\n\nThe only thing you would need to wrap around is \"git\" itself,\nisn't it?\n"}]}