Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: git/git
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7e1976e210
Choose a base ref
...
head repository: git/git
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 476998d05b
Choose a head ref
  • 17 commits
  • 15 files changed
  • 2 contributors

Commits on Jul 31, 2019

  1. Drop unused git-rebase--am.sh

    Since 2185362 (built-in rebase: call `git am` directly, 2019-01-18),
    the built-in rebase already uses the built-in `git am` directly.
    
    Now that d03ebd4 (rebase: remove the rebase.useBuiltin setting,
    2019-03-18) even removed the scripted rebase, there is no longer any
    user of `git-rebase--am.sh`, so let's just remove it.
    
    Signed-off-by: Johannes Schindelin <[email protected]>
    Signed-off-by: Junio C Hamano <[email protected]>
    dscho authored and gitster committed Jul 31, 2019
    Configuration menu
    Copy the full SHA
    d5b581f View commit details
    Browse the repository at this point in the history
  2. t3400: stop referring to the scripted rebase

    One test case's title mentioned the then-current implementation detail
    that the `--am` backend was implemented in `git-rebase--am.sh`.
    
    This is no longer the case, so let's update the title to reflect the
    current reality.
    
    Signed-off-by: Johannes Schindelin <[email protected]>
    Signed-off-by: Junio C Hamano <[email protected]>
    dscho authored and gitster committed Jul 31, 2019
    Configuration menu
    Copy the full SHA
    6180b20 View commit details
    Browse the repository at this point in the history
  3. .gitignore: there is no longer a built-in git-rebase--interactive

    This went away in 0609b74 (rebase -i: combine rebase--interactive.c
    with rebase.c, 2019-04-17).
    
    Signed-off-by: Johannes Schindelin <[email protected]>
    Signed-off-by: Junio C Hamano <[email protected]>
    dscho authored and gitster committed Jul 31, 2019
    Configuration menu
    Copy the full SHA
    2e7bbac View commit details
    Browse the repository at this point in the history
  4. sequencer: the am and rebase--interactive scripts are gone

    Update a code comment that referred to those files as if they were still
    there.
    
    Signed-off-by: Johannes Schindelin <[email protected]>
    Signed-off-by: Junio C Hamano <[email protected]>
    dscho authored and gitster committed Jul 31, 2019
    Configuration menu
    Copy the full SHA
    68b54f6 View commit details
    Browse the repository at this point in the history
  5. rebase: fold git-rebase--common into the -p backend

    The only remaining scripted part of `git rebase` is the
    `--preserve-merges` backend. Meaning: there is little reason to keep the
    "library of common rebase functions" as a separate file.
    
    While moving the functions to `git-rebase--preserve-merges.sh`, we also
    drop the `move_to_original_branch` function that is no longer used.
    
    Signed-off-by: Johannes Schindelin <[email protected]>
    Signed-off-by: Junio C Hamano <[email protected]>
    dscho authored and gitster committed Jul 31, 2019
    Configuration menu
    Copy the full SHA
    5efed0e View commit details
    Browse the repository at this point in the history
  6. t3427: add a clarifying comment

    The flow of this test script is outright confusing, and to start the
    endeavor to address that, let's describe what this test is all about,
    and how it tries to do it.
    
    Signed-off-by: Johannes Schindelin <[email protected]>
    Signed-off-by: Junio C Hamano <[email protected]>
    dscho authored and gitster committed Jul 31, 2019
    Configuration menu
    Copy the full SHA
    8c1e240 View commit details
    Browse the repository at this point in the history
  7. t3427: simplify the setup test case significantly

    It still does the very same thing as before, but expresses it in a much
    more succinct (and still quite readable) manner.
    
    Signed-off-by: Johannes Schindelin <[email protected]>
    Signed-off-by: Junio C Hamano <[email protected]>
    dscho authored and gitster committed Jul 31, 2019
    Configuration menu
    Copy the full SHA
    c248d32 View commit details
    Browse the repository at this point in the history
  8. t3427: move the filter-branch invocation into the setup case

    The step to prepare a pre-rebase commit history is _identical_ in _all_
    of the test cases (except of course the `setup` case). It should
    therefore clearly a part of the `setup` test case instead.
    
    As the `git filter-branch` command is quite costly on platforms where
    Unix shell scripting is simply slow (meaning: on Windows), this shaves
    off a noticeable part of the runtime: in this developer's setup, the
    time was reduced from ~1m25s to ~1m.
    
    Signed-off-by: Johannes Schindelin <[email protected]>
    Signed-off-by: Junio C Hamano <[email protected]>
    dscho authored and gitster committed Jul 31, 2019
    Configuration menu
    Copy the full SHA
    d51b771 View commit details
    Browse the repository at this point in the history
  9. t3427: condense the unnecessarily repetitive test cases into three

    Previously, this test script performed essentially three rebases and
    verified breakages by testing the post-rebase commits' messages.
    
    To do so, the rebases were performed multiple times, though, once per
    commit message to test. This wastes electricity (and CO2) and time.
    
    Let's condense the test cases to the essential number: the number of
    different rebases to validate.
    
    On Windows, where the scripted nature of the `--preserve-merges` backend
    hurts performance rather badly, this reduces the overall runtime in this
    developer's setup from ~1m to ~28s while still performing the exact same
    testing as before.
    
    Signed-off-by: Johannes Schindelin <[email protected]>
    Signed-off-by: Junio C Hamano <[email protected]>
    dscho authored and gitster committed Jul 31, 2019
    Configuration menu
    Copy the full SHA
    b8c6f24 View commit details
    Browse the repository at this point in the history
  10. t3427: fix erroneous assumption

    Apart from the `setup` test case, `t3427-rebase-subtree.sh` is made up
    exclusively of demonstrations of breakages. The tricky thing about such
    demonstrations is that they are often buggy themselves.
    
    In this instance, somewhere over the course of the six iterations
    of the patch that eventually made it into Git's `master` as 5f35900
    (contrib/subtree: Add a test for subtree rebase that loses commits,
    2016-06-28), the commit message "files_subtree/master4" was changed to
    just "master4", but the test cases still expected the old commit
    message.
    
    Let's fix this, at long last.
    
    Signed-off-by: Johannes Schindelin <[email protected]>
    Signed-off-by: Junio C Hamano <[email protected]>
    dscho authored and gitster committed Jul 31, 2019
    Configuration menu
    Copy the full SHA
    a9c7107 View commit details
    Browse the repository at this point in the history
  11. t3427: accommodate for the rebase --merge backend having been replaced

    Since 68aa495 (rebase: implement --merge via the interactive
    machinery, 2018-12-11), the job of the old `--merge` backend is now
    performed by the `--interactive` backend, too.
    
    One consequence is that empty commits are no longer rebased by default.
    
    Meaning that the test case that calls `git rebase -Xsubtree` (which used
    to be handled by the `--merge` backend) now needs to ask explicitly for
    the empty commit to be rebased.
    
    Signed-off-by: Johannes Schindelin <[email protected]>
    Signed-off-by: Junio C Hamano <[email protected]>
    dscho authored and gitster committed Jul 31, 2019
    Configuration menu
    Copy the full SHA
    f67336d View commit details
    Browse the repository at this point in the history
  12. t3427: fix another incorrect assumption

    The test case that concerns `git rebase -Xsubtree` (with the
    default rebase backend, not with `--preserve-merges`) starts out with a
    pre-rebase commit history that begins with a commit that introduces
    three files: master1.t, master2.t and master3.t.
    
    This commit was generated by passing a subtree merge commit through `git
    filter-branch --subdirectory-filter`, so it looks as if this commit
    really introduces all those files.
    
    The commit history onto which this commit is then rebased, however,
    introduced those files in individual commits. For that reason, the
    rebase will fail, it _must_ fail, because the first `pick` results in no
    changes to be committed.
    
    Let's fix the test case to expect exactly this situation.
    
    With this change, we can mark the original bug that this test case tried
    to demonstrate as fixed.
    
    Signed-off-by: Johannes Schindelin <[email protected]>
    Signed-off-by: Junio C Hamano <[email protected]>
    dscho authored and gitster committed Jul 31, 2019
    Configuration menu
    Copy the full SHA
    4e6023b View commit details
    Browse the repository at this point in the history
  13. rebase -r: support merge strategies other than recursive

    We already support merge strategies in the sequencer, but only for
    `pick` commands.
    
    With this commit, we now also support them in `merge` commands. The
    approach is simple: if any merge strategy option is specified, or if any
    merge strategy other than `recursive` is specified, we simply spawn the
    `git merge` command. Otherwise, we handle the merge in-process just as
    before.
    
    Signed-off-by: Johannes Schindelin <[email protected]>
    Signed-off-by: Junio C Hamano <[email protected]>
    dscho authored and gitster committed Jul 31, 2019
    Configuration menu
    Copy the full SHA
    e145d99 View commit details
    Browse the repository at this point in the history
  14. t/lib-rebase: prepare for testing git rebase --rebase-merges

    The format of the todo list is quite a bit different in the
    `--rebase-merges` mode; Let's prepare the fake editor to handle those
    todo lists properly, too.
    
    The original idea was that we keep the original command unless
    overridden, and because the original todo lists only had `pick` lines
    anyway, we could be sloppy and "override" the command by the same
    command (i.e. use the sed replacement pattern "pick" instead of "&").
    
    This actually would not have worked with `fixup` and `squash` commands,
    but it would appear that we never tried to use the fake editor with
    `--autosquash`.
    
    However, in the next commit we want to use the fake editor in
    conjunction with `--rebase-merges`, so let's use the correct sed
    replacement pattern.
    
    Technically, it is not necessary to take care of the `fakesha` thing
    (where we reuse the sed replacement pattern to craft a new todo
    command), at least for now, as the only user of that thing overrides the
    `action` anyway. Nevertheless, for completeness' sake, we do take care
    of it.
    
    Helped-by: brian m. carlson <[email protected]>
    Signed-off-by: Johannes Schindelin <[email protected]>
    Signed-off-by: Junio C Hamano <[email protected]>
    dscho authored and gitster committed Jul 31, 2019
    Configuration menu
    Copy the full SHA
    5dcdd74 View commit details
    Browse the repository at this point in the history
  15. t3418: test rebase -r with merge strategies

    There is a test case in this script that verifies that `git rebase
    --preserve-merges` works all right with non-default merge strategies or
    non-default merge strategy options.
    
    Now that `git rebase --rebase-merges` learned about merge strategies,
    let's copy-edit this test case to verify that that works as intended,
    too.
    
    Signed-off-by: Johannes Schindelin <[email protected]>
    Signed-off-by: Junio C Hamano <[email protected]>
    dscho authored and gitster committed Jul 31, 2019
    Configuration menu
    Copy the full SHA
    a63f990 View commit details
    Browse the repository at this point in the history
  16. rebase -r: do not (re-)generate root commits with --root *and* `--o…

    …nto`
    
    When rebasing a complete commit history onto a given commit, it is
    pretty obvious that the root commits should be rebased on top of said
    given commit.
    
    To test this, let's kill two birds with one stone and add a test case to
    t3427-rebase-subtree.sh that not only demonstrates that this works, but
    also that `git rebase -r` works with merge strategies now.
    
    Signed-off-by: Johannes Schindelin <[email protected]>
    Signed-off-by: Junio C Hamano <[email protected]>
    dscho authored and gitster committed Jul 31, 2019
    Configuration menu
    Copy the full SHA
    e1fac53 View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2019

  1. t3427: accelerate this test by using fast-export and fast-import

    fast-export and fast-import can easily handle the simple rewrite that
    was being done by filter-branch, and should be faster on systems with a
    slow fork.  Measuring the overall time taken for all of t3427 (not just
    the difference between filter-branch and fast-export/fast-import) shows
    a speedup of about 5% on Linux and 11% on Mac.
    
    Signed-off-by: Elijah Newren <[email protected]>
    Signed-off-by: Junio C Hamano <[email protected]>
    newren authored and gitster committed Sep 5, 2019
    Configuration menu
    Copy the full SHA
    476998d View commit details
    Browse the repository at this point in the history
Loading