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

Re: [Bug] git pull doesn't recognize --work-tree parameter

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Oct 13, 2011, 10:55 UTC
Message-ID
<CACsJy8AgW8fg3iOKQw=vv2s20hF0PTGD9Py-eMOTBmAv+6CYWg@mail.gmail.com>
In-Reply-To
<E95C75ED-99F2-463C-A1AB-0F8152696739@jetbrains.com>

On Thu, Oct 13, 2011 at 7:38 PM, Kirill Likhodedov <kirill.likhodedov@jetbrains.com> wrote:

Show 9 quoted lines
>
> 'git pull' doesn't work from outside the working tree even if '--work-tree' is specified:
>
> # git version
> git version 1.7.6
> # git --git-dir=/Users/loki/sandbox/git/child/.git --work-tree=/Users/loki/sandbox/git/child pull
> fatal: /opt/local/libexec/git-core/git-pull cannot be used without a working tree.
>
> Note that  'git fetch' and 'git merge origin/master' work fine, so 'git pull' should be easy to fix :)

Not exactly. git-pull is a shell script and may have problems that a builtin command like git-fetch never has. An "easy" way is to just build git-pull in. I have such a (stalled) WIP since May. Thanks for reminding me to finish my work :)

-- 
Duy
Previous: Kirill LikhodedovNext: Jeff King
Message 2 of 10 in “[Bug] git pull doesn't recognize --work-tree parameter”
  1. Kirill LikhodedovOct 13, 2011
  2. Nguyen Thai Ngoc DuyOct 13, 2011
  3. Jeff KingOct 13, 2011
  4. Junio C HamanoOct 13, 2011
  5. Jeff KingOct 13, 2011
  6. Junio C HamanoOct 13, 2011
  7. Jeff KingOct 13, 2011
  8. Jeff KingOct 13, 2011
  9. Junio C HamanoOct 18, 2011
  10. Junio C HamanoOct 13, 2011

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.