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

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_TREE
The first one also needs $(pwd) quoted.
-- Hannes
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 3 of 6 in “setup_git_directory: Setup cwd properly if worktree is found”
  1. setup_git_directory: Setup cwd properly if worktree is foundNguyễn Thái Ngọc Duy, Nov 12, 2007
  2. Johannes SchindelinNov 12, 2007
  3. Johannes SixtNov 12, 2007
  4. Johannes SchindelinNov 12, 2007
  5. Nguyen Thai Ngoc DuyNov 27, 2007
  6. Johannes SchindelinNov 27, 2007

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.