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

Re: -C option with pull doesn't seem to be respected in aliases in git 2.6.4.

From
Duy Nguyen <pclouds@gmail.com>
Date
Dec 21, 2015, 09:57 UTC
Message-ID
<CACsJy8BDCqX4+i0krS-8Xq2q-4-siwdCcG5+Maqa8XEUU3sVOg@mail.gmail.com>
In-Reply-To
<CACsJy8D=a4NUi+zWj=DVrzRdCxzWA6hp8kCaPAN_Cwv7H7Ohkg@mail.gmail.com>
On Mon, Dec 21, 2015 at 8:17 AM, Duy Nguyen <pclouds@gmail.com> wrote:
Show 14 quoted lines
> On Fri, Dec 18, 2015 at 8:35 AM, Cameron Esfahani <dirty@apple.com> wrote:
>> I have git project checked out at ~/llvm.  Inside of there, inside of a “tools” directory, I have another project checked out as “lldb”:
>>
>> ~/llvm/tools/lldb
>>
>> I wrote an alias which would help me update all my projects:
>>
>>         all = !find . -type d -name .git | sed 's:/.git::' | xargs -I{} -t git -C {} $1 && :
>>
>> This would allow me to be inside of ~/llvm and type "git all pull" and get all my projects updated.
>>
>> It seems that at some point this broke.  If try to use this alias under git 2.6.4, it only updates the llvm project.
>>
>> The interesting thing is that if I pass fetch, instead of pull: "git all fetch", then it seems to work correctly.

Because the difference between git-fetch and git-pull in git.c is NEED_WORK_TREE. Can you try to unset GIT_WORK_TREE before "find"? This could be yet another regression from d95138e (setup: set env $GIT_WORK_TREE when work tree is set, like $GIT_DIR - 2015-06-26)

-- 
Duy
Previous: Duy Nguyen
Message 3 of 3 in “-C option with pull doesn't seem to be respected in aliases in git 2.6.4.”
  1. Cameron EsfahaniDec 18, 2015
  2. Duy NguyenDec 21, 2015
  3. Duy NguyenDec 21, 2015

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.