Performance improvement for git pull rebase and autostash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have some suggestions to improve performance of 'git pull --rebase'.

1. If I have no new local commits "git pull --rebase" will do a fast 
forward merge. But if I have changes to local files I have to stash them 
also if they are not affected by the new commits from origin. I think in 
that case git should not reject changes to every local file and has to use 
the fast forward merge validation instead.

2. If I have no changes to local files and I use 'git pull --rebase 
--autostash' no stashing should take place.


The improved workflow would look like as follows.


                         git pull rebase = true or preserve
                               |
                               |
                               |
                               |
                               |
                        check if local branch has no new commits
                               |
         no                    |                   yes
          ---------------------+--------------------- 
          |                                         |
          |                                         |
          |                                         |
   rebase validation                      ff merge validation for 
   for local changes                      conflicting local changes 
          |                                         |
no changes|      changes             no conflicts   |    has conflicts 
  --------+---------                    ------------+----------
  |                |                    |                     |
  |                |                    |                     |
  |                |                    |                     |
do rebase     use autostash?         do ff merge         use autostash?
  |                |                    |                     |
  |        no      |      yes           |            no       |      yes
  |        --------+---------           |            ---------+---------
  |        |                |           |            |                 |
  |        |                |           |            |                 |
  |   conflict error   stash changes    |      conflict error     stash 
changes
  |        |                |           |            |                 |
  |        |                |           |            |                 |
  |        |            do rebase       |            |            do ff 
merge
  |        |                |           |            |                 |
  |        |                |           |            |                 |
  |        |            pop stash       |            |             pop 
stash
  |        |                |           |            |                 |
  |        |                |           |            |                 |
success  abort           success     success       abort success



Regarda,
Mattias





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux