git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Performance improvement for git pull rebase and autostash
@ 2017-07-10 16:09 neuling
  0 siblings, 0 replies; 2+ messages in thread
From: neuling @ 2017-07-10 16:09 UTC (permalink / raw)
  To: git

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Performance improvement for git pull rebase and autostash
       [not found] <OF9C7EC4BE.7EA71FCD-ONC1258159.003A60B3-C1258159.0058C18F@LocalDomain>
@ 2017-07-10 16:39 ` neuling
  0 siblings, 0 replies; 2+ messages in thread
From: neuling @ 2017-07-10 16:39 UTC (permalink / raw)
  To: git

Sorry, the max characters per line restriction of the e-mail broke the 
workflow.

Here it is again. 

          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       |            |           ff merge
  |        |                |           |            |                 |
  |        |                |           |            |                 |
  |        |            pop stash       |            |          pop stash
  |        |                |           |            |                 |
  |        |                |           |            |                 |
success  abort           success     success       abort          success



Regarda,
Mattias




Von:    Mattias Neuling/DAKOSY/DE
An:     git@vger.kernel.org
Datum:  10.07.2017 18:09
Betreff:        Performance improvement for git pull rebase and autostash 



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






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-10 16:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <OF9C7EC4BE.7EA71FCD-ONC1258159.003A60B3-C1258159.0058C18F@LocalDomain>
2017-07-10 16:39 ` Performance improvement for git pull rebase and autostash neuling
2017-07-10 16:09 neuling

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).