Re: [PATCH] setup_git_directory: Setup cwd properly if worktree is found
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Nov 12, 2007, 12:53 UTC
- Message-ID
- <47384CDD.5000209@viscovery.net>
- In-Reply-To
- <20071112112408.GA5420@laptop>
Nguyễn Thái Ngọc Duy schrieb:
> +export SAVED_WORK_DIR=$(pwd)/work > +export GIT_DIR="$(pwd)"/repo.git > +export GIT_CONFIG="$GIT_DIR"/config > +export GIT_WORK_TREE="$(pwd)"/work
These are not very portable; use:
GIT_DIR="$(pwd)"/repo.git
GIT_CONFIG="$GIT_DIR"/config
GIT_WORK_TREE="$(pwd)"/work
export GIT_DIR GIT_CONFIG GIT_WORK_TREEThe first one also needs $(pwd) quoted.
-- Hannes