{"thread":{"id":"41139","subject":"[BUG?] worktree setup broken in subdirs with git alias","startedAt":"2016-01-07T07:15:51Z","lastAt":"2016-01-07T09:49:14Z","messageCount":6,"participants":["Michael J Gruber","Duy Nguyen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"275465","messageId":"568E10A7.5050606@drmicha.warpmail.net","threadId":"41139","inReplyTo":null,"subject":"[BUG?] worktree setup broken in subdirs with git alias","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2016-01-07T07:15:51Z","receivedAt":"2016-01-07T07:15:51Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Hi there,\n\nsorry I can't dig deeper now, but the worktree code from next seems to\nget confused now as soon as you cd to a subdir of a worktree (other than\nthe main worktree) and use an alias:\n\ngit help ss\n`git ss' is aliased to `status -s -b'\n[mjg@skimbleshanks Biomath-WS15 (exam $)]✓ git status -s -b\n## exam\n[mjg@skimbleshanks Biomath-WS15 (exam $)]✓ git ss\nfatal: internal error: work tree has already been set\nCurrent worktree: /home/mjg/Teaching/LUK\nNew worktree: /home/mjg/Teaching/LUK/Biomath-WS15\n\nThis is inside the subdir \"Biomath-WS15\" of the worktree residing in\n\".../LUK\".\n\nIt wasn't like that last year ;)\n\nSomething about setting GIT_DIR and the like in the environment must\nhave changed (for aliases), badly interacting with the worktree code.\n\nMichael\n"},{"id":"275468","messageId":"CACsJy8CRJhdb9Gf+SkC+BSHuGa0DPEBZnCDRUa7zkJvrBK72kQ@mail.gmail.com","threadId":"41139","inReplyTo":"568E10A7.5050606@drmicha.warpmail.net","subject":"Re: [BUG?] worktree setup broken in subdirs with git alias","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2016-01-07T09:26:02Z","receivedAt":"2016-01-07T09:26:02Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Thu, Jan 7, 2016 at 2:15 PM, Michael J Gruber\n<git@drmicha.warpmail.net> wrote:\n> Hi there,\n>\n> sorry I can't dig deeper now, but the worktree code from next seems to\n> get confused now as soon as you cd to a subdir of a worktree (other than\n> the main worktree) and use an alias:\n>\n> git help ss\n> `git ss' is aliased to `status -s -b'\n> [mjg@skimbleshanks Biomath-WS15 (exam $)]✓ git status -s -b\n> ## exam\n> [mjg@skimbleshanks Biomath-WS15 (exam $)]✓ git ss\n> fatal: internal error: work tree has already been set\n\nYou forgot to mention what version you used. But it's probably related\nto d95138e (setup: set env $GIT_WORK_TREE when work tree is set, like\n$GIT_DIR - 2015-06-26). This commit fixed your problem (and was\nreleased) but it introduced some other regressions so it's been\nreverted in 'next'. 'pu' has a re-fix on top of the revert.\n\n> Current worktree: /home/mjg/Teaching/LUK\n> New worktree: /home/mjg/Teaching/LUK/Biomath-WS15\n>\n> This is inside the subdir \"Biomath-WS15\" of the worktree residing in\n> \".../LUK\".\n>\n> It wasn't like that last year ;)\n>\n> Something about setting GIT_DIR and the like in the environment must\n> have changed (for aliases), badly interacting with the worktree code.\n>\n> Michael\n-- \nDuy\n"},{"id":"275469","messageId":"CACsJy8BVys_0yLjt0Ttk2TsYeNmF5UKqqyraNJ532VB7tuKSKg@mail.gmail.com","threadId":"41139","inReplyTo":"CACsJy8CRJhdb9Gf+SkC+BSHuGa0DPEBZnCDRUa7zkJvrBK72kQ@mail.gmail.com","subject":"Re: [BUG?] worktree setup broken in subdirs with git alias","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2016-01-07T09:31:00Z","receivedAt":"2016-01-07T09:31:00Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Thu, Jan 7, 2016 at 4:26 PM, Duy Nguyen <pclouds@gmail.com> wrote:\n> You forgot to mention what version you used.\n\nGaaah i need to work on my reading skills. You did mention 'next' in\n\n>> sorry I can't dig deeper now, but the worktree code from next seems to\n\nSo it matches my expectation. Merge branch\nnd/clear-gitenv-upon-use-of-alias to fix it.\n-- \nDuy\n"},{"id":"275470","messageId":"568E3282.1060508@drmicha.warpmail.net","threadId":"41139","inReplyTo":"CACsJy8CRJhdb9Gf+SkC+BSHuGa0DPEBZnCDRUa7zkJvrBK72kQ@mail.gmail.com","subject":"Re: [BUG?] worktree setup broken in subdirs with git alias","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2016-01-07T09:40:18Z","receivedAt":"2016-01-07T09:40:18Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Duy Nguyen venit, vidit, dixit 07.01.2016 10:26:\n> On Thu, Jan 7, 2016 at 2:15 PM, Michael J Gruber\n> <git@drmicha.warpmail.net> wrote:\n>> Hi there,\n>>\n>> sorry I can't dig deeper now, but the worktree code from next seems to\n>> get confused now as soon as you cd to a subdir of a worktree (other than\n>> the main worktree) and use an alias:\n>>\n>> git help ss\n>> `git ss' is aliased to `status -s -b'\n>> [mjg@skimbleshanks Biomath-WS15 (exam $)]✓ git status -s -b\n>> ## exam\n>> [mjg@skimbleshanks Biomath-WS15 (exam $)]✓ git ss\n>> fatal: internal error: work tree has already been set\n> \n> You forgot to mention what version you used. But it's probably related\n> to d95138e (setup: set env $GIT_WORK_TREE when work tree is set, like\n> $GIT_DIR - 2015-06-26). This commit fixed your problem (and was\n> released) but it introduced some other regressions so it's been\n> reverted in 'next'. 'pu' has a re-fix on top of the revert.\n\nWell, I mentioned \"from next\", which I admit is not super-precise (it's\nnext not older than a day or two, plus some local additions). In fact it is:\n\nef7b32d (Sync with 2.7, 2016-01-04)\n\nwhich \"has\" d95138e (as per git branch contains) but also df1e6ea87\nwhich reverts it. (I guess --really-contains would be neat but difficult.)\n\nSo while I didn't notice the problems that lead to the revert, I noticed\nthe problems the revert created... Early adopters' luck.\n\nAs for the fix on pu, do you mean that one:\nac78663 (run-command: don't warn on SIGPIPE deaths, 2015-12-29)\n\nI'll give it a shot then.\n\nMichael\n"},{"id":"275471","messageId":"CACsJy8BrvFi2uL1KVxrRDnPRAikpLwWcSSu8udfFBzEz7P6QMw@mail.gmail.com","threadId":"41139","inReplyTo":"568E3282.1060508@drmicha.warpmail.net","subject":"Re: [BUG?] worktree setup broken in subdirs with git alias","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2016-01-07T09:48:21Z","receivedAt":"2016-01-07T09:48:21Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Thu, Jan 7, 2016 at 4:40 PM, Michael J Gruber\n<git@drmicha.warpmail.net> wrote:\n> As for the fix on pu, do you mean that one:\n> ac78663 (run-command: don't warn on SIGPIPE deaths, 2015-12-29)\n\nAnd the three commits before that, if you cherry-pick instead of\nmerge, so 0d5466d to ac78663\n-- \nDuy\n"},{"id":"275472","messageId":"568E349A.30902@drmicha.warpmail.net","threadId":"41139","inReplyTo":"568E3282.1060508@drmicha.warpmail.net","subject":"Re: [BUG?] worktree setup broken in subdirs with git alias","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2016-01-07T09:49:14Z","receivedAt":"2016-01-07T09:49:14Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Michael J Gruber venit, vidit, dixit 07.01.2016 10:40:\n> Duy Nguyen venit, vidit, dixit 07.01.2016 10:26:\n>> On Thu, Jan 7, 2016 at 2:15 PM, Michael J Gruber\n>> <git@drmicha.warpmail.net> wrote:\n>>> Hi there,\n>>>\n>>> sorry I can't dig deeper now, but the worktree code from next seems to\n>>> get confused now as soon as you cd to a subdir of a worktree (other than\n>>> the main worktree) and use an alias:\n>>>\n>>> git help ss\n>>> `git ss' is aliased to `status -s -b'\n>>> [mjg@skimbleshanks Biomath-WS15 (exam $)]✓ git status -s -b\n>>> ## exam\n>>> [mjg@skimbleshanks Biomath-WS15 (exam $)]✓ git ss\n>>> fatal: internal error: work tree has already been set\n>>\n>> You forgot to mention what version you used. But it's probably related\n>> to d95138e (setup: set env $GIT_WORK_TREE when work tree is set, like\n>> $GIT_DIR - 2015-06-26). This commit fixed your problem (and was\n>> released) but it introduced some other regressions so it's been\n>> reverted in 'next'. 'pu' has a re-fix on top of the revert.\n> \n> Well, I mentioned \"from next\", which I admit is not super-precise (it's\n> next not older than a day or two, plus some local additions). In fact it is:\n> \n> ef7b32d (Sync with 2.7, 2016-01-04)\n> \n> which \"has\" d95138e (as per git branch contains) but also df1e6ea87\n> which reverts it. (I guess --really-contains would be neat but difficult.)\n> \n> So while I didn't notice the problems that lead to the revert, I noticed\n> the problems the revert created... Early adopters' luck.\n> \n> As for the fix on pu, do you mean that one:\n> ac78663 (run-command: don't warn on SIGPIPE deaths, 2015-12-29)\n> \n> I'll give it a shot then.\n> \n> Michael\n\nMeanwhile you had answered my question before I even asked it. Great\nuser support over here :)\n\nAnd hooray, merging ac78663 saves my problem, thanks!\n\nSince I didn't notice the problems that the earlier fix caused I can't\nsay whether the newer fix avoids them.\n\nMichael\n"}]}