[Insight-developers] I cannot commit after I run ./Utilities/SetupForDevelopment.sh

Jian Cheng jian.cheng.1983 at gmail.com
Mon Jun 3 08:36:57 EDT 2013



On 06/03/2013 08:31 AM, Brad King wrote:
> On 06/03/2013 08:21 AM, Jian Cheng wrote:
>> [jcheng at jcT530 ITK_clean]$ git ci
>> .git/hooks/hooks-config.bash: line 33: .: .hooks-config.bash: file not found
> Is "git ci" an alias?  Does "git commit" work?
Yes, it is alias of "git commit"
>
>> [jcheng at jcT530 ITK_clean]$ bash -x .git/hooks/hooks-config.bash
>> + test -z ''
>> ++ git rev-parse --git-dir
>> + export GIT_DIR=.git
>> + GIT_DIR=.git
>> + hooks_config=.hooks-config
>> + test -r .hooks-config
>> + config=.hooks-config.bash
>> + test -r .hooks-config.bash
>> + . .hooks-config.bash
>> ++ hooks_chain_pre_commit=Utilities/Hooks/pre-commit
>> ++ hooks_chain_commit_msg=Utilities/Hooks/commit-msg
>> ++ hooks_chain_prepare_commit_msg=Utilities/Hooks/prepare-commit-msg
>> + HOOKS_DIR=.git/hooks
> So it works when run directly but not under the commit hook.
> Run the command
>
>   (set -x && export SHELLOPTS GIT_TRACE=1 && git commit -m "") >commit.log 2>&1
>
> and post the commit.log output please.

See the bash output and commit.log

[jcheng at jcT530 ITK_clean]$ git commit
.git/hooks/hooks-config.bash: line 33: .: .hooks-config.bash: file not found
[jcheng at jcT530 ITK_clean]$ git --version
git version 1.7.12
[jcheng at jcT530 ITK_clean]$  (set -x && export SHELLOPTS GIT_TRACE=1 && 
git commit -m "") >commit.log 2>&1


+ export SHELLOPTS GIT_TRACE=1
+ GIT_TRACE=1
+ git commit -m ''
trace: built-in: git 'commit' '-m' ''
trace: run_command: '.git/hooks/pre-commit'
+ which tg
++ tg --hooks-path
+ TG_VERSION=0.8
/usr/bin/tg: line 113: !/bin/sh": event not found
+ '[' -d /usr/libexec/topgit ']'
+ set -e
++ git rev-parse --git-dir
trace: built-in: git 'rev-parse' '--git-dir'
+ git_dir=.git
++ git rev-parse --show-cdup
trace: built-in: git 'rev-parse' '--show-cdup'
+ root_dir=
+ root_dir=.
+ root_dir=.
++ git config topgit.remote
+ base_remote=
+ :
+ tg=tg
+ setup_ours
+ '[' '!' -s .git/info/attributes ']'
+ grep -q topmsg .git/info/attributes
+ git config merge.ours.driver
trace: built-in: git 'config' 'merge.ours.driver'
+ setup_hook pre-commit
+ hook_call='"$(tg --hooks-path)"/pre-commit "$@"'
+ '[' -f .git/hooks/pre-commit ']'
+ fgrep -q '"$(tg --hooks-path)"/pre-commit "$@"' .git/hooks/pre-commit
+ return
++ mktemp -d .git/tg-tmp.XXXXXX
+ tg_tmp_dir=.git/tg-tmp.LKiXnn
+ trap 'rm -rf ".git/tg-tmp.LKiXnn"' EXIT
+ '[' -z '' ']'
+ '[' --hooks-path = -r ']'
+ cmd=--hooks-path
+ '[' -n --hooks-path ']'
+ shift
+ case "$cmd" in
+ echo /usr/libexec/topgit/hooks
+ rm -rf .git/tg-tmp.LKiXnn
+ /usr/libexec/topgit/hooks/pre-commit
+ set -e
+ tg__include=1
+ tg_util
+ . /usr/bin/tg
++ TG_VERSION=0.8
++ '[' -d /usr/libexec/topgit ']'
++ set -e
+++ git rev-parse --git-dir
trace: built-in: git 'rev-parse' '--git-dir'
++ git_dir=.git
+++ git rev-parse --show-cdup
trace: built-in: git 'rev-parse' '--show-cdup'
++ root_dir=
++ root_dir=.
++ root_dir=.
+++ git config topgit.remote
++ base_remote=
++ :
++ tg=tg
++ setup_ours
++ '[' '!' -s .git/info/attributes ']'
++ grep -q topmsg .git/info/attributes
++ git config merge.ours.driver
trace: built-in: git 'config' 'merge.ours.driver'
++ setup_hook pre-commit
++ hook_call='"$(tg --hooks-path)"/pre-commit "$@"'
++ '[' -f .git/hooks/pre-commit ']'
++ fgrep -q '"$(tg --hooks-path)"/pre-commit "$@"' .git/hooks/pre-commit
++ return
+++ mktemp -d .git/tg-tmp.XXXXXX
++ tg_tmp_dir=.git/tg-tmp.4sA69s
++ trap 'rm -rf ".git/tg-tmp.4sA69s"' EXIT
++ '[' -z 1 ']'
++ git symbolic-ref -q HEAD
trace: built-in: git 'symbolic-ref' '-q' 'HEAD'
+ head_=refs/heads/master
+ case "$head_" in
+ head_=master
+ git rev-parse -q --verify refs/top-bases/master
trace: built-in: git 'rev-parse' '-q' '--verify' 'refs/top-bases/master'
+ exit 0
+ rm -rf .git/tg-tmp.4sA69s
+ . .git/hooks/hooks-config.bash
++ test -z .git
++ hooks_config=.hooks-config
++ test -r .hooks-config
++ config=.hooks-config.bash
++ test -r .hooks-config.bash
++ . .hooks-config.bash
.git/hooks/hooks-config.bash: line 33: .: .hooks-config.bash: file not found

>
> -Brad



More information about the Insight-developers mailing list