{"thread":{"id":"15041","subject":"Problem with --work-tree","startedAt":"2008-08-16T21:14:13Z","lastAt":"2008-08-18T09:32:28Z","messageCount":3,"participants":["Сергей Шарыбин","Nguyen Thai Ngoc Duy","Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"87389","messageId":"48A74325.1040805@school9.perm.ru","threadId":"15041","inReplyTo":null,"subject":"Problem with --work-tree","fromName":"Сергей Шарыбин","fromEmail":"nazgul@school9.perm.ru","sentAt":"2008-08-16T21:14:13Z","receivedAt":"2008-08-16T21:14:13Z","isPatch":false,"sender":{"key":"nazgul@school9.perm.ru","avatar":null},"body":"Hi,\n\nI've got the following problem. I've got a GIT repo at \n/home/nazgul/src/test-work-tree and I've got some changed files in this \nrepo. I want to see this changes when a `git` runs outside this \ndirectory. I tried to run `git \n--git-dir=/home/nazgul/src/test-work-tree/.git \n--work-tree=/home/nazgul/src/test-work-tree diff-index --name-status \nHEAD` from my home directory. In such way diff-index tells me that all \nfiles from my repo has been deleted. I think it is because this command \ndoes not understand a --work-tree parameter. And I saw the same problem \nwith a git diff command (something like that: git \n--git-dir=/home/nazgul/src/test-work-tree/.git \n--work-tree=/home/nazgul/src/test-work-tree diff).\n\nI use git version debian.1.5.6.3.1\n\nIs it my mistake or it is bugs in a GIT?\n\n-- \nWith best regards, Sergey I. Sharybin\n"},{"id":"87408","messageId":"fcaeb9bf0808162224u2d337878vb1dfef09a6b48a16@mail.gmail.com","threadId":"15041","inReplyTo":"48A74325.1040805@school9.perm.ru","subject":"Re: Problem with --work-tree","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2008-08-17T05:24:42Z","receivedAt":"2008-08-17T05:24:42Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On 8/17/08, Сергей Шарыбин <nazgul@school9.perm.ru> wrote:\n> Hi,\n>\n>  I've got the following problem. I've got a GIT repo at\n> /home/nazgul/src/test-work-tree and I've got some changed\n> files in this repo. I want to see this changes when a `git` runs outside\n> this directory. I tried to run `git\n> --git-dir=/home/nazgul/src/test-work-tree/.git\n> --work-tree=/home/nazgul/src/test-work-tree diff-index\n> --name-status HEAD` from my home directory. In such way diff-index tells me\n> that all files from my repo has been deleted. I think it is because this\n> command does not understand a --work-tree parameter. And I saw the same\n> problem with a git diff command (something like that: git\n> --git-dir=/home/nazgul/src/test-work-tree/.git\n> --work-tree=/home/nazgul/src/test-work-tree diff).\n\nI think it's a bug. For now use \"git status\" instead.\n-- \nDuy\n"},{"id":"87525","messageId":"g8bfjc$551$1@ger.gmane.org","threadId":"15041","inReplyTo":"48A74325.1040805@school9.perm.ru","subject":"Re: Problem with --work-tree","fromName":"Michael J Gruber","fromEmail":"michaeljgruber+gmane@fastmail.fm","sentAt":"2008-08-18T09:32:28Z","receivedAt":"2008-08-18T09:32:28Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Сергей Шарыбин venit, vidit, dixit 16.08.2008 23:14:\n> Hi,\n> \n> I've got the following problem. I've got a GIT repo at \n> /home/nazgul/src/test-work-tree and I've got some changed files in this \n> repo. I want to see this changes when a `git` runs outside this \n> directory. I tried to run `git \n> --git-dir=/home/nazgul/src/test-work-tree/.git \n> --work-tree=/home/nazgul/src/test-work-tree diff-index --name-status \n> HEAD` from my home directory. In such way diff-index tells me that all \n> files from my repo has been deleted. I think it is because this command \n> does not understand a --work-tree parameter. And I saw the same problem \n> with a git diff command (something like that: git \n> --git-dir=/home/nazgul/src/test-work-tree/.git \n> --work-tree=/home/nazgul/src/test-work-tree diff).\n> \n> I use git version debian.1.5.6.3.1\n> \n> Is it my mistake or it is bugs in a GIT?\n\nWorking from a path outside the work tree is broken (read: not meeting\nthe obvious/naive meaning of the --work-tree option and core.worktree\nsetting) in many places, unfortunately. Some commands work with\n--git-dir and the like, but some just don't. I use a shell alias which\ncds into the work tree first. This works with everything except for some\nstubborn tcl/tk scripts doing their own thing (gui...) in case git-dir\nand work-tree are not in the standard places (.git, .).\n\nMichael\n"}]}