{"thread":{"id":"38847","subject":"Submodule not working with specified work-tree","startedAt":"2015-03-18T15:31:20Z","lastAt":"2015-03-18T15:31:20Z","messageCount":1,"participants":["Jimmy Zelinskie"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"257961","messageId":"CACPE2UYkPc3nHM7g1MJt8u57P4TukuBo7Qbjn=f+axH81nvdWQ@mail.gmail.com","threadId":"38847","inReplyTo":null,"subject":"Submodule not working with specified work-tree","fromName":"Jimmy Zelinskie","fromEmail":"jimmy.zelinskie@coreos.com","sentAt":"2015-03-18T15:31:20Z","receivedAt":"2015-03-18T15:31:20Z","isPatch":false,"sender":{"key":"jimmy.zelinskie@coreos.com","avatar":null},"body":"It seems like submodule isn't picking up on the work tree that I'm\nspecifying. In the scenario that I'm working with, I'd prefer to not\nhave to \"cd\" into a directory to update the submodules. All the other\ngit subcommands that I'm executing work fine with specifying the git\ndir and work tree via envvars or parameters. I'm not sure if this is a\nbug or not.\n\n$ git --git-dir $HOME/testrepo/.git --work-tree $HOME/testrepo\nsubmodule update --init --recursive\nfatal: /usr/local/Cellar/git/2.3.0/libexec/git-core/git-submodule\ncannot be used without a working tree.\n\n$ GIT_WORK_TREE=$HOME/testrepo GIT_DIR=$HOME/testrepo/.git git\nsubmodule update --init --recursive\nfatal: /usr/local/Cellar/git/2.3.0/libexec/git-core/git-submodule\ncannot be used without a working tree.\n\n$ git version\ngit version 2.3.0\n\n$ uname -a\nDarwin hanazawa.local 14.1.0 Darwin Kernel Version 14.1.0: Mon Dec 22\n23:10:38 PST 2014; root:xnu-2782.10.72~2/RELEASE_X86_64 x86_64\n"}]}