{"thread":{"id":"50849","subject":"git-gui: unstaged changes windowpane resets after unstaging a line","startedAt":"2019-03-31T18:45:06Z","lastAt":"2019-04-01T12:30:10Z","messageCount":5,"participants":["Jan Ziak","Bert Wesarg"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"372839","messageId":"CAODFU0qcwZm=2YnGm+rccDT2e5yZU3pyYGUGTwr9izod+e0s0A@mail.gmail.com","threadId":"50849","inReplyTo":null,"subject":"git-gui: unstaged changes windowpane resets after unstaging a line","fromName":"Jan Ziak","fromEmail":"0xe2.0x9a.0x9b@gmail.com","sentAt":"2019-03-31T18:44:53Z","receivedAt":"2019-03-31T18:45:06Z","isPatch":false,"sender":{"key":"0xe2.0x9a.0x9b@gmail.com","avatar":"https://gravatar.com/avatar/f5c8ab1a4a405f877f5caf23a7105cae64785ae147161b93922c6e26020be3e5?d=mp&s=160"},"body":"Hello\n\nAfter performing \"Unstage Line From Commit\" action, the \"Unstaged\nChanges\" windowpane is reset. The reset does not happen with \"Unstage\nHunk From Commit\" action.\n\ngit version 2.21.0\n\nSincerely\nJan\n"},{"id":"372842","messageId":"CAKPyHN2Unp7Cou86fefYo9nD_ApokMxRMih=d27=rp634bYKwQ@mail.gmail.com","threadId":"50849","inReplyTo":"CAODFU0qcwZm=2YnGm+rccDT2e5yZU3pyYGUGTwr9izod+e0s0A@mail.gmail.com","subject":"Re: git-gui: unstaged changes windowpane resets after unstaging a line","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2019-03-31T19:14:50Z","receivedAt":"2019-03-31T19:15:03Z","isPatch":false,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"Hi Jan,\n\nOn Sun, Mar 31, 2019 at 8:45 PM Jan Ziak <0xe2.0x9a.0x9b@gmail.com> wrote:\n>\n> Hello\n>\n> After performing \"Unstage Line From Commit\" action, the \"Unstaged\n> Changes\" windowpane is reset. The reset does not happen with \"Unstage\n> Hunk From Commit\" action.\n\nbecause its not necessary when staging a hunk. Though when staging a\nline it is better to run the diff algorithm again.\n\nAnyway, which problem do you observe in particular?\n\nBest,\nBert\n\n>\n> git version 2.21.0\n>\n> Sincerely\n> Jan\n"},{"id":"372844","messageId":"CAODFU0p4FxZP34L=LAZX=25EFn6NK8vD7p47bsUu8yd+TpCb_Q@mail.gmail.com","threadId":"50849","inReplyTo":"CAKPyHN2Unp7Cou86fefYo9nD_ApokMxRMih=d27=rp634bYKwQ@mail.gmail.com","subject":"Re: git-gui: unstaged changes windowpane resets after unstaging a line","fromName":"Jan Ziak","fromEmail":"0xe2.0x9a.0x9b@gmail.com","sentAt":"2019-03-31T19:47:50Z","receivedAt":"2019-03-31T19:48:06Z","isPatch":false,"sender":{"key":"0xe2.0x9a.0x9b@gmail.com","avatar":"https://gravatar.com/avatar/f5c8ab1a4a405f877f5caf23a7105cae64785ae147161b93922c6e26020be3e5?d=mp&s=160"},"body":"On Sun, 31 Mar 2019 at 21:15, Bert Wesarg <bert.wesarg@googlemail.com> wrote:\n>\n> Hi Jan,\n>\n> On Sun, Mar 31, 2019 at 8:45 PM Jan Ziak <0xe2.0x9a.0x9b@gmail.com> wrote:\n> >\n> > Hello\n> >\n> > After performing \"Unstage Line From Commit\" action, the \"Unstaged\n> > Changes\" windowpane is reset. The reset does not happen with \"Unstage\n> > Hunk From Commit\" action.\n>\n> because its not necessary when staging a hunk. Though when staging a\n> line it is better to run the diff algorithm again.\n\nYes. I was thinking comparing the old state of \"Unstaged Changes\" to\nthe new state and preserving (or approximating) the selected filename\nand scroller position if possible.\n\nWhen unstaging a line (or a hunk) there is internally no possibility\nfor the currently selected filename to disappear from the \"Unstaged\nChanges\" list.\n\n> Anyway, which problem do you observe in particular?\n\nThe problem is that the selected filename and scroller position are\nreinitialized. It is uncomfortable when \"Unstaged Changes\" contains a\nlot of filenames.\n\nSincerely\nJan\n\n> Best,\n> Bert\n>\n> >\n> > git version 2.21.0\n> >\n> > Sincerely\n> > Jan\n"},{"id":"372855","messageId":"CAKPyHN1ekK8o8vnBEhvjLtz0G0=FFVkpAH6Qq92TC3E=dXQGfg@mail.gmail.com","threadId":"50849","inReplyTo":"CAODFU0p4FxZP34L=LAZX=25EFn6NK8vD7p47bsUu8yd+TpCb_Q@mail.gmail.com","subject":"Re: git-gui: unstaged changes windowpane resets after unstaging a line","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2019-04-01T06:40:19Z","receivedAt":"2019-04-01T06:40:41Z","isPatch":false,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"On Sun, Mar 31, 2019 at 9:48 PM Jan Ziak <0xe2.0x9a.0x9b@gmail.com> wrote:\n>\n> On Sun, 31 Mar 2019 at 21:15, Bert Wesarg <bert.wesarg@googlemail.com> wrote:\n> >\n> > Hi Jan,\n> >\n> > On Sun, Mar 31, 2019 at 8:45 PM Jan Ziak <0xe2.0x9a.0x9b@gmail.com> wrote:\n> > >\n> > > Hello\n> > >\n> > > After performing \"Unstage Line From Commit\" action, the \"Unstaged\n> > > Changes\" windowpane is reset. The reset does not happen with \"Unstage\n> > > Hunk From Commit\" action.\n> >\n> > because its not necessary when staging a hunk. Though when staging a\n> > line it is better to run the diff algorithm again.\n>\n> Yes. I was thinking comparing the old state of \"Unstaged Changes\" to\n> the new state and preserving (or approximating) the selected filename\n> and scroller position if possible.\n>\n> When unstaging a line (or a hunk) there is internally no possibility\n> for the currently selected filename to disappear from the \"Unstaged\n> Changes\" list.\n>\n> > Anyway, which problem do you observe in particular?\n>\n> The problem is that the selected filename and scroller position are\n> reinitialized. It is uncomfortable when \"Unstaged Changes\" contains a\n> lot of filenames.\n\nI can't confirm this behavior. Neither when staging lines from the\n\"Unstaged Changes\" file list, nor when unstaging lines from the\n\"Stages Changes (Will Commit)\" file list.\n\nCould you try to come up with a recipe from an empty repository?\n\nBest,\nBert\n\n>\n> Sincerely\n> Jan\n>\n>\n"},{"id":"372884","messageId":"CAODFU0pDR0KhZjzJpZCj3W-uFpWfsvq87r_sh4rN=y_Qb-hAhg@mail.gmail.com","threadId":"50849","inReplyTo":"CAKPyHN1ekK8o8vnBEhvjLtz0G0=FFVkpAH6Qq92TC3E=dXQGfg@mail.gmail.com","subject":"Re: git-gui: unstaged changes windowpane resets after unstaging a line","fromName":"Jan Ziak","fromEmail":"0xe2.0x9a.0x9b@gmail.com","sentAt":"2019-04-01T12:29:54Z","receivedAt":"2019-04-01T12:30:10Z","isPatch":false,"sender":{"key":"0xe2.0x9a.0x9b@gmail.com","avatar":"https://gravatar.com/avatar/f5c8ab1a4a405f877f5caf23a7105cae64785ae147161b93922c6e26020be3e5?d=mp&s=160"},"body":"On Mon, 1 Apr 2019 at 08:40, Bert Wesarg <bert.wesarg@googlemail.com> wrote:\n> Could you try to come up with a recipe from an empty repository?\n\n$ cat a.sh\n#!/bin/bash\nset -e\ngit init\nfor((i=0; i<25; i++)); do\n    echo line1 > file$i\ndone\ngit add file*\ngit commit -m \"initial commit\"\nfor((i=0; i<25; i++)); do\n    echo line2 >> file$i\n    echo line3 >> file$i\n    echo line4 >> file$i\ndone\ngit gui\n\nRun a.sh in a new empty directory, then:\n  1. Select \"Unstaged Changes\" -> file24\n  2. Stage line2 & line3 for commit\n  3. Select \"Staged Changes\" -> file24\n  4. Unstage line2 from commit (see the attached screenshot)\n  5. >>> \"Unstaged Changes\" windowpane resets <<<\n\nSincerely\nJan\n"}]}