{"thread":{"id":"40931","subject":"GIT_WORK_TREE not set as expected when changing git repository from a script using a git alias","startedAt":"2015-12-04T09:54:54Z","lastAt":"2015-12-04T14:31:50Z","messageCount":2,"participants":["Gabriel Ganne","Duy Nguyen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"273999","messageId":"CAE1CpdRY4fdppx35FyK9fqY8YNzrxvW+WPgqb73mh32tJUF3vQ@mail.gmail.com","threadId":"40931","inReplyTo":null,"subject":"GIT_WORK_TREE not set as expected when changing git repository from a script using a git alias","fromName":"Gabriel Ganne","fromEmail":"gabriel.ganne@gmail.com","sentAt":"2015-12-04T09:54:54Z","receivedAt":"2015-12-04T09:54:54Z","isPatch":false,"sender":{"key":"gabriel.ganne@gmail.com","avatar":null},"body":"Hi,\n\nFollowing commit d95138e695d99d32dcad528a2a7974f434c51e79 (since\nv2.5.1) the following workflow I use seems broken :\n\nI wrote a script to list all git repositories that can be found from\nwhere I am, and then call for each repository a given command.\n\nGiven the following tree, where \"a\" & \"b\" are git repositories,\n├── a\n│   ├── a_file\n│   └── b\n│       └── b_file\n\nIf I call the script from a git alias, the content of \"a\" will be\nlisted as untracked files from \"b\".\nThis is true only when called using the alias.\n\nFor example :\n$ git all status # called from repository a\n [a]\nOn branch master\nUntracked files:\n  (use \"git add <file>...\" to include in what will be committed)\n\n        b/\n\nnothing added to commit but untracked files present (use \"git add\" to track)\n [b]\nOn branch master\nChanges not staged for commit:\n  (use \"git add/rm <file>...\" to update what will be committed)\n  (use \"git checkout -- <file>...\" to discard changes in working directory)\n\n        deleted:    ../b_file\n\nUntracked files:\n  (use \"git add <file>...\" to include in what will be committed)\n\n        ../a_file\n        ./\n\nno changes added to commit (use \"git add\" and/or \"git commit -a\"\n\nI am afraid I did not understand the commit\nd95138e695d99d32dcad528a2a7974f434c51e79, and do not know how to fix\nthis.\nI am working around the issue by setting GIT_WORK_TREE manually.\n\nI attached a sample with my example, the script, and the alias I used.\n\nBest regards,\n\n--\nGabriel Ganne\n"},{"id":"274001","messageId":"CACsJy8BSca7qdxcPojaPEjGwur+Nnsq2KFWsKX4gcVKR2N6e6A@mail.gmail.com","threadId":"40931","inReplyTo":"CAE1CpdRY4fdppx35FyK9fqY8YNzrxvW+WPgqb73mh32tJUF3vQ@mail.gmail.com","subject":"Re: GIT_WORK_TREE not set as expected when changing git repository from a script using a git alias","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2015-12-04T14:31:50Z","receivedAt":"2015-12-04T14:31:50Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Fri, Dec 4, 2015 at 10:54 AM, Gabriel Ganne <gabriel.ganne@gmail.com> wrote:\n> Hi,\n>\n> Following commit d95138e695d99d32dcad528a2a7974f434c51e79 (since\n> v2.5.1) the following workflow I use seems broken :\n\nYou are not the first one bitten [1] by that commit. A fix is being\nworked on [2]. Sorry for the trouble.\n\n[1] http://thread.gmane.org/gmane.comp.version-control.git/281608\n[2] http://article.gmane.org/gmane.comp.version-control.git/281960\n-- \nDuy\n"}]}