Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix built-in rebase perf regression #72

Closed

Commits on Nov 12, 2018

  1. rebase: consolidate clean-up code before leaving reset_head()

    The same clean-up code is repeated quite a few times; Let's DRY up the
    code some.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed Nov 12, 2018
    Configuration menu
    Copy the full SHA
    28e24d9 View commit details
    Browse the repository at this point in the history
  2. rebase: prepare reset_head() for more flags

    Currently, we only accept the flag indicating whether the HEAD should be
    detached not. In the next commit, we want to introduce another flag: to
    toggle between emulating `reset --hard` vs `checkout -q`.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed Nov 12, 2018
    Configuration menu
    Copy the full SHA
    db963b2 View commit details
    Browse the repository at this point in the history
  3. built-in rebase: reinstate checkout -q behavior where appropriate

    When we converted a `git checkout -q $onto^0` call to use
    `reset_head()`, we inadvertently incurred a change from a twoway_merge
    to a oneway_merge, as if we wanted a `git reset --hard` instead.
    
    This has performance ramifications under certain, though, as the
    oneway_merge needs to lstat() every single index entry whereas
    twoway_merge does not.
    
    So let's go back to the old behavior.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed Nov 12, 2018
    Configuration menu
    Copy the full SHA
    a7360b8 View commit details
    Browse the repository at this point in the history