From: Qingning Huo <qhuo@mayhq.org>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Invoke git-repo-config directly.
Date: Thu, 16 Mar 2006 20:33:19 +0000 [thread overview]
Message-ID: <20060316203319.GA20159@localhost.localdomain> (raw)
In-Reply-To: <7v64mebxsu.fsf@assigned-by-dhcp.cox.net>
On Thu, Mar 16, 2006 at 12:26:09AM -0800, Junio C Hamano wrote:
>
> We could probably define a shell function that looks like:
>
> git_exec () {
> cmd="$1"
> shift
> case "${GIT_EXEC_PATH+set}" in
> set) ;;
> *) GIT_EXEC_PATH='@@GIT_EXEC_PATH@@' ;;
> esac
> "$GIT_EXEC_PATH/git-$cmd" "$@"
> }
>
> in git-sh-setup [*1*], and then rewrite the above to something
> like this instead:
>
> diff --git a/git-commit.sh b/git-commit.sh
> index 330a434..8a73420 100755
> --- a/git-commit.sh
> +++ b/git-commit.sh
> ...
> @@ -115,7 +115,7 @@ run_status () {
> echo '#
> # Initial commit
> #'
> - git-ls-files |
> + git_exec ls-files |
> sed -e '
> s/\\/\\\\/g
> s/ /\\ /g
> @@ -126,7 +126,7 @@ run_status () {
> committable="$?"
> fi
>
> - git-diff-files --name-status |
> + git_exec diff-files --name-status |
> sed -e '
> s/\\/\\\\/g
> s/ /\\ /g
> ...
>
> But that does not cover Perl nor Python scripts, and does not
> address the ugliness either.
This is similiar to what I had in mind when I recommended the full path
approach. Perl or Python should be able to do the similiar. I have no
comment on the ugliness. The functionality and effeciency of the
program is more important to me. But I do recognize the difficulties of
changing all scripts overnight.
Anyway, there are at least other two ways to solve my problem. (a)
setup PATH in git-sh-setup, or (b) consistently use git-command form in
scripts. Even before their implementation, I can still use "git push".
Qingning
next prev parent reply other threads:[~2006-03-16 20:33 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-14 21:10 [PATCH] Invoke git-repo-config directly Qingning Huo
2006-03-14 21:20 ` Johannes Schindelin
2006-03-14 21:30 ` Qingning Huo
2006-03-14 21:58 ` Linus Torvalds
2006-03-14 22:40 ` Qingning Huo
2006-03-14 23:07 ` Linus Torvalds
2006-03-15 20:40 ` Qingning Huo
2006-03-15 21:33 ` Junio C Hamano
2006-03-15 21:35 ` Junio C Hamano
2006-03-15 22:11 ` Qingning Huo
2006-03-15 22:51 ` Linus Torvalds
2006-03-15 23:35 ` Junio C Hamano
2006-03-16 7:53 ` Qingning Huo
2006-03-16 7:57 ` Junio C Hamano
2006-03-16 8:26 ` Junio C Hamano
2006-03-16 12:53 ` Mark Wooding
2006-03-16 13:53 ` Andreas Ericsson
2006-03-17 2:10 ` Junio C Hamano
2006-03-17 10:51 ` Mark Wooding
2006-03-16 14:27 ` Timo Hirvonen
2006-03-16 14:39 ` Andreas Ericsson
2006-03-16 20:33 ` Qingning Huo [this message]
2006-03-16 10:14 ` Junio C Hamano
2006-03-16 11:55 ` Andreas Ericsson
2006-03-16 19:27 ` Jon Loeliger
2006-03-16 19:32 ` Jon Loeliger
2006-03-16 6:37 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060316203319.GA20159@localhost.localdomain \
--to=qhuo@mayhq.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox