+
Skip to content

rebase: offer to reschedule failed exec commands automatically #90

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

Closed
wants to merge 3 commits into from

Conversation

dscho
Copy link
Member

@dscho dscho commented Nov 29, 2018

The idea was brought up by Paul Morelle.

To be honest, this idea of rescheduling a failed exec makes so much sense that I wish we had done this from the get-go.

So let's do the next best thing: implement a command-line option and a config setting to make it so.

The obvious intent behind that config setting is to not only give users a way to opt into that behavior already, but also to make it possible to flip the default at a later date, after the feature has been battle-tested and after deprecating the non-rescheduling behavior for a couple of Git versions.

If the team agrees with my reasoning, then the 3rd patch (introducing -y <cmd> as a shortcut for --reschedule-failed-exec -x <cmd>) might not make much sense, as it would introduce a short option that would become obsolete soon.

Changes since v1:

  • Implemented that "--reschedule-failed-exec needs interactive backend" check also in the legacy rebase.

@dscho dscho force-pushed the reschedule-failed-exec branch from cc1834a to 86ed094 Compare November 29, 2018 13:24
@dscho dscho added this to the after-v2.20.0 milestone Nov 30, 2018
@dscho
Copy link
Member Author

dscho commented Dec 10, 2018

/submit

@gitgitgadget
Copy link

gitgitgadget bot commented Dec 10, 2018

An error occurred while submitting:

Error: git fetch https://github.com/gitgitgadget/git -- +refs/notes/gitgitgadget:refs/notes/gitgitgadget +refs/pull/90/head:refs/pull/90/head +refs/heads/maint:refs/remotes/upstream/maint +refs/heads/master:refs/remotes/upstream/master +refs/heads/next:refs/remotes/upstream/next +refs/heads/pu:refs/remotes/upstream/pu failed: 1,
From https://github.com/gitgitgadget/git

  • [new ref] refs/pull/90/head -> refs/pull/90/head
    error: cannot lock ref 'refs/remotes/upstream/master': is at 5d826e9 but expected 7068cbc
    ! 7068cbc..5d826e9 master -> upstream/master (unable to update local ref)
    error: cannot lock ref 'refs/remotes/upstream/next': is at bc1bbc6 but expected 157a1e0
    ! 157a1e0..bc1bbc6 next -> upstream/next (unable to update local ref)
    error: cannot lock ref 'refs/remotes/upstream/pu': is at 3a4c262 but expected 54ebd9b
    ! 54ebd9b...3a4c262 pu -> upstream/pu (unable to update local ref)

@dscho
Copy link
Member Author

dscho commented Dec 10, 2018

/submit

@gitgitgadget
Copy link

gitgitgadget bot commented Dec 10, 2018

Submitted as pull.90.git.gitgitgadget@gmail.com

A common use case for the `--exec` option is to verify that each commit
in a topic branch compiles cleanly, via `git rebase -x make <base>`.

However, when an `exec` in such a rebase fails, it is not re-scheduled,
which in this instance is not particularly helpful.

Let's offer a flag to reschedule failed `exec` commands.

Based on an idea by Paul Morelle.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
It would be cumbersome to type out that option all the time, so let's
offer the convenience of a config setting: rebase.rescheduleFailedExec.

Besides, this opens the door to changing the default in a future version
of Git: it does make some sense to reschedule failed `exec` commands by
default (and if we could go back in time when the `exec` command was
invented, we probably would change that default right from the start).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
It is a bit cumbersome to write out the `--reschedule-failed-exec`
option before `-x <cmd>` all the time; let's introduce a convenient
option to do both at the same time: `-y <cmd>`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho force-pushed the reschedule-failed-exec branch from 86ed094 to 6460b09 Compare December 11, 2018 10:55
@gitgitgadget
Copy link

gitgitgadget bot commented Dec 15, 2018

This branch is now known as js/rebase-i-redo-exec.

@gitgitgadget
Copy link

gitgitgadget bot commented Dec 15, 2018

This patch series was integrated into pu via git@7d3921b.

@gitgitgadget gitgitgadget bot added the pu label Dec 15, 2018
@gitgitgadget
Copy link

gitgitgadget bot commented Jan 3, 2019

This patch series was integrated into pu via git@c325fa8.

@gitgitgadget
Copy link

gitgitgadget bot commented Jan 3, 2019

This patch series was integrated into pu via git@809f8a4.

@gitgitgadget
Copy link

gitgitgadget bot commented Jan 4, 2019

This patch series was integrated into pu via git@a111575.

@gitgitgadget
Copy link

gitgitgadget bot commented Jan 7, 2019

This patch series was integrated into pu via git@429e469.

@gitgitgadget
Copy link

gitgitgadget bot commented Jan 8, 2019

This patch series was integrated into pu via git@9d2a58e.

@gitgitgadget
Copy link

gitgitgadget bot commented Jan 8, 2019

This patch series was integrated into pu via git@8076fda.

@gitgitgadget
Copy link

gitgitgadget bot commented Jan 10, 2019

This patch series was integrated into pu via git@987009a.

@gitgitgadget
Copy link

gitgitgadget bot commented Jan 11, 2019

This patch series was integrated into pu via git@9cae067.

@gitgitgadget
Copy link

gitgitgadget bot commented Jan 18, 2019

This patch series was integrated into pu via git@7373c51.

@gitgitgadget
Copy link

gitgitgadget bot commented Jan 18, 2019

This patch series was integrated into pu via git@b5b3ef6.

@gitgitgadget
Copy link

gitgitgadget bot commented Jan 18, 2019

This patch series was integrated into next via git@71be3fe.

@gitgitgadget gitgitgadget bot added the next label Jan 18, 2019
@gitgitgadget
Copy link

gitgitgadget bot commented Jan 29, 2019

This patch series was integrated into pu via git@d9d9ab0.

@gitgitgadget
Copy link

gitgitgadget bot commented Jan 29, 2019

This patch series was integrated into next via git@d9d9ab0.

@gitgitgadget
Copy link

gitgitgadget bot commented Jan 29, 2019

This patch series was integrated into master via git@d9d9ab0.

@gitgitgadget gitgitgadget bot added the master label Jan 29, 2019
@gitgitgadget gitgitgadget bot closed this Jan 29, 2019
@gitgitgadget
Copy link

gitgitgadget bot commented Jan 29, 2019

Closed via d9d9ab0.

@dscho dscho deleted the reschedule-failed-exec branch January 29, 2019 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载