{"thread":{"id":"46347","subject":"Performance improvement for git pull rebase and autostash","startedAt":"2017-07-10T16:39:38Z","lastAt":"2017-07-10T16:39:38Z","messageCount":1,"participants":["neuling@dakosy.de"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"324083","messageId":"OF53944D94.A662A3B8-ONC1258159.005AD737-C1258159.005B828E@dakosy.de","threadId":"46347","inReplyTo":"OF9C7EC4BE.7EA71FCD-ONC1258159.003A60B3-C1258159.0058C18F@LocalDomain","subject":"Performance improvement for git pull rebase and autostash","fromName":"","fromEmail":"neuling@dakosy.de","sentAt":"2017-07-10T16:39:32Z","receivedAt":"2017-07-10T16:39:38Z","isPatch":false,"sender":{"key":"neuling@dakosy.de","avatar":null},"body":"Sorry, the max characters per line restriction of the e-mail broke the \nworkflow.\n\nHere it is again. \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 changes\n  |        |                |           |            |                 |\n  |        |                |           |            |                 |\n  |        |            do rebase       |            |           ff merge\n  |        |                |           |            |                 |\n  |        |                |           |            |                 |\n  |        |            pop stash       |            |          pop stash\n  |        |                |           |            |                 |\n  |        |                |           |            |                 |\nsuccess  abort           success     success       abort          success\n\n\n\nRegarda,\nMattias\n\n\n\n\nVon:    Mattias Neuling/DAKOSY/DE\nAn:     git@vger.kernel.org\nDatum:  10.07.2017 18:09\nBetreff:        Performance improvement for git pull rebase and autostash \n\n\n\nHi,\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 \n\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\n\n\n"}]}