{"thread":{"id":"41805","subject":"Gitk \"External diff\" broken when using worktree","startedAt":"2016-03-24T02:55:41Z","lastAt":"2016-03-29T09:40:50Z","messageCount":4,"participants":["Daryl Van Den Brink","Duy Nguyen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"281630","messageId":"CAC4jX8FWs30v-Vh7XyPP9_ba3HKd4hAhRBrwfMpBPZd5ku8rUA@mail.gmail.com","threadId":"41805","inReplyTo":null,"subject":"Gitk \"External diff\" broken when using worktree","fromName":"Daryl Van Den Brink","fromEmail":"daryl.vandenbrink@maptek.com.au","sentAt":"2016-03-24T02:55:41Z","receivedAt":"2016-03-24T02:55:41Z","isPatch":false,"sender":{"key":"daryl.vandenbrink@maptek.com.au","avatar":null},"body":"Hi,\n\nI'm using git 2.7.3 on cygwin, and have been taking advantage of the\nnew \"git worktree\" feature. I noticed that when I launch gitk from one\nof the attached working directories, its \"external diff\" feature\ndoesn't seem to work. Nothing shows up in the diff tool at all.\nHowever, it works if you launch gitk from the main repository.\n\nTo reproduce:\n1. Create a new working tree with \"git worktree add\"\n2. From that new worktree, launch gitk.\n3. Right-click in a file in the bottom right pane and click \"External diff\"\n4. No useful diff appears.\n\n-- \nDaryl van den Brink\n"},{"id":"281652","messageId":"CACsJy8D84e4iQ6Pz_zyqsXuV6c2ier6s_W99+1hKszd0gHiUaQ@mail.gmail.com","threadId":"41805","inReplyTo":"CAC4jX8FWs30v-Vh7XyPP9_ba3HKd4hAhRBrwfMpBPZd5ku8rUA@mail.gmail.com","subject":"Re: Gitk \"External diff\" broken when using worktree","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2016-03-24T09:22:12Z","receivedAt":"2016-03-24T09:22:12Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Thu, Mar 24, 2016 at 9:55 AM, Daryl Van Den Brink\n<daryl.vandenbrink@maptek.com.au> wrote:\n> Hi,\n>\n> I'm using git 2.7.3 on cygwin, and have been taking advantage of the\n> new \"git worktree\" feature. I noticed that when I launch gitk from one\n> of the attached working directories, its \"external diff\" feature\n> doesn't seem to work. Nothing shows up in the diff tool at all.\n> However, it works if you launch gitk from the main repository.\n>\n> To reproduce:\n> 1. Create a new working tree with \"git worktree add\"\n> 2. From that new worktree, launch gitk.\n> 3. Right-click in a file in the bottom right pane and click \"External diff\"\n> 4. No useful diff appears.\n\nWorks for me (on linux with 'master' branch). Maybe gitk selected\ninvalid tempdir on cygwin. You can try replace your external diff\nprogram with a script or something that prints the whole command line.\nThat should reveal if gitk given paths are correct or not (or if gitk\nfails even before that)\n-- \nDuy\n"},{"id":"282015","messageId":"CAC4jX8E0URpxYmTU96xaFh-zEfT_q8RNfGy53DoNV5OFNjgxbQ@mail.gmail.com","threadId":"41805","inReplyTo":"CACsJy8D84e4iQ6Pz_zyqsXuV6c2ier6s_W99+1hKszd0gHiUaQ@mail.gmail.com","subject":"Re: Gitk \"External diff\" broken when using worktree","fromName":"Daryl Van Den Brink","fromEmail":"daryl.vandenbrink@maptek.com.au","sentAt":"2016-03-29T00:17:18Z","receivedAt":"2016-03-29T00:17:18Z","isPatch":false,"sender":{"key":"daryl.vandenbrink@maptek.com.au","avatar":null},"body":"I've done that, and here are the two arguments that it gives to the diff tool:\n\n>From the main repository (in which case the it works):\n\n.git/.gitk-tmp.CCxPmN/1/[1980e260494cbd225d482b5d962e77bdcdb2321c]\nRemoteTransaction.C\n.git/.gitk-tmp.CCxPmN/1/[2759bf6053e73cb5f7c11c646aee206242db2cd4]\nRemoteTransaction.C\n\n>From the auxiliary worktree (when the diff doesn't work):\n\n/home/daryl.vandenbrink/git-work/mdf_products/.git/worktrees/mdf2/.gitk-tmp.ZEdGpi/1/[1980e260494cbd225d482b5d962e77bdcdb2321c]\nRemoteTransaction.C\n/home/daryl.vandenbrink/git-work/mdf_products/.git/worktrees/mdf2/.gitk-tmp.ZEdGpi/1/[2759bf6053e73cb5f7c11c646aee206242db2cd4]\nRemoteTransaction.C\n\nI hope that helps.\n\n\nOn 24 March 2016 at 19:52, Duy Nguyen <pclouds@gmail.com> wrote:\n> On Thu, Mar 24, 2016 at 9:55 AM, Daryl Van Den Brink\n> <daryl.vandenbrink@maptek.com.au> wrote:\n>> Hi,\n>>\n>> I'm using git 2.7.3 on cygwin, and have been taking advantage of the\n>> new \"git worktree\" feature. I noticed that when I launch gitk from one\n>> of the attached working directories, its \"external diff\" feature\n>> doesn't seem to work. Nothing shows up in the diff tool at all.\n>> However, it works if you launch gitk from the main repository.\n>>\n>> To reproduce:\n>> 1. Create a new working tree with \"git worktree add\"\n>> 2. From that new worktree, launch gitk.\n>> 3. Right-click in a file in the bottom right pane and click \"External diff\"\n>> 4. No useful diff appears.\n>\n> Works for me (on linux with 'master' branch). Maybe gitk selected\n> invalid tempdir on cygwin. You can try replace your external diff\n> program with a script or something that prints the whole command line.\n> That should reveal if gitk given paths are correct or not (or if gitk\n> fails even before that)\n> --\n> Duy\n\n\n\n-- \nDaryl van den Brink\nSoftware Engineer\nMaptek | 31 Flemington Street, Glenside, SA 5065, Australia\nTel: +61-8 8338 9222 | Dir: +61-8 8338 9222 | Fax: +61-8 8338 9229\ndaryl.vandenbrink@maptek.com.au | www.maptek.com\n\nKeep up to date with Maptek in our Forge newsletter.\n"},{"id":"282032","messageId":"CACsJy8AJr8diCyv=ZfADtm=Aw96RjAHd7ZD2xR6VEQ-ZXQTCBg@mail.gmail.com","threadId":"41805","inReplyTo":"CAC4jX8E0URpxYmTU96xaFh-zEfT_q8RNfGy53DoNV5OFNjgxbQ@mail.gmail.com","subject":"Re: Gitk \"External diff\" broken when using worktree","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2016-03-29T09:40:50Z","receivedAt":"2016-03-29T09:40:50Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Tue, Mar 29, 2016 at 7:17 AM, Daryl Van Den Brink\n<daryl.vandenbrink@maptek.com.au> wrote:\n> I've done that, and here are the two arguments that it gives to the diff tool:\n>\n> From the main repository (in which case the it works):\n>\n> .git/.gitk-tmp.CCxPmN/1/[1980e260494cbd225d482b5d962e77bdcdb2321c]\n> RemoteTransaction.C\n> .git/.gitk-tmp.CCxPmN/1/[2759bf6053e73cb5f7c11c646aee206242db2cd4]\n> RemoteTransaction.C\n>\n> From the auxiliary worktree (when the diff doesn't work):\n>\n> /home/daryl.vandenbrink/git-work/mdf_products/.git/worktrees/mdf2/.gitk-tmp.ZEdGpi/1/[1980e260494cbd225d482b5d962e77bdcdb2321c]\n> RemoteTransaction.C\n> /home/daryl.vandenbrink/git-work/mdf_products/.git/worktrees/mdf2/.gitk-tmp.ZEdGpi/1/[2759bf6053e73cb5f7c11c646aee206242db2cd4]\n> RemoteTransaction.C\n>\n> I hope that helps.\n\nI can only guess that the content in those two files are the same.\nWhich mean the bug is somewhere else. I'm afraid I can't help further\nbecause I'm not familiar with gitk (not even its user for that matter)\n-- \nDuy\n"}]}