{"thread":{"id":"46346","subject":"Performance improvement for git pull rebase and autostash","startedAt":"2017-07-10T16:09:36Z","lastAt":"2017-07-10T16:09:36Z","messageCount":1,"participants":["neuling@dakosy.de"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"324078","messageId":"OF9C7EC4BE.7EA71FCD-ONC1258159.003A60B3-C1258159.0058C18F@dakosy.de","threadId":"46346","inReplyTo":null,"subject":"Performance improvement for git pull rebase and autostash","fromName":"","fromEmail":"neuling@dakosy.de","sentAt":"2017-07-10T16:09:27Z","receivedAt":"2017-07-10T16:09:36Z","isPatch":false,"sender":{"key":"neuling@dakosy.de","avatar":null},"body":"Hi,\n\nI have some suggestions to improve performance of 'git pull --rebase'.\n\n1. If I have no new local commits \"git pull --rebase\" will do a fast \nforward merge. But if I have changes to local files I have to stash them \nalso if they are not affected by the new commits from origin. I think in \nthat case git should not reject changes to every local file and has to use \nthe fast forward merge validation instead.\n\n2. If I have no changes to local files and I use 'git pull --rebase \n--autostash' no stashing should take place.\n\n\nThe improved workflow would look like as follows.\n\n\n                         git pull rebase = true or preserve\n                               |\n                               |\n                               |\n                               |\n                               |\n                        check if local branch has no new commits\n                               |\n         no                    |                   yes\n          ---------------------+--------------------- \n          |                                         |\n          |                                         |\n          |                                         |\n   rebase validation                      ff merge validation for \n   for local changes                      conflicting local changes \n          |                                         |\nno changes|      changes             no conflicts   |    has conflicts \n  --------+---------                    ------------+----------\n  |                |                    |                     |\n  |                |                    |                     |\n  |                |                    |                     |\ndo rebase     use autostash?         do ff merge         use autostash?\n  |                |                    |                     |\n  |        no      |      yes           |            no       |      yes\n  |        --------+---------           |            ---------+---------\n  |        |                |           |            |                 |\n  |        |                |           |            |                 |\n  |   conflict error   stash changes    |      conflict error     stash \nchanges\n  |        |                |           |            |                 |\n  |        |                |           |            |                 |\n  |        |            do rebase       |            |            do ff \nmerge\n  |        |                |           |            |                 |\n  |        |                |           |            |                 |\n  |        |            pop stash       |            |             pop \nstash\n  |        |                |           |            |                 |\n  |        |                |           |            |                 |\nsuccess  abort           success     success       abort success\n\n\n\nRegarda,\nMattias\n\n\n"}]}