{"thread":{"id":"49998","subject":"Re: [PATCH 0/3] rebase: offer to reschedule failed exec commands automatically","startedAt":"2018-12-10T23:13:21Z","lastAt":"2018-12-10T23:13:21Z","messageCount":1,"participants":["Elijah Newren"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"364988","messageId":"20181210231311.15621-1-newren@gmail.com","threadId":"49998","inReplyTo":null,"subject":"Re: [PATCH 0/3] rebase: offer to reschedule failed exec commands automatically","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2018-12-10T23:13:11Z","receivedAt":"2018-12-10T23:13:21Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Mon, Dec 10, 2018 at 1:18 PM Johannes Schindelin via GitGitGadget\n<gitgitgadget@gmail.com> wrote:\n\n> The idea was brought up by Paul Morelle.\n>\n> To be honest, this idea of rescheduling a failed exec makes so much sense\n> that I wish we had done this from the get-go.\n> \n> So let's do the next best thing: implement a command-line option and a\n> config setting to make it so.\n\nI was a bit worried that the optics weren't good enough for recovering from\na typoed exec command (or one that otherwise wouldn't be in a state the\nuser could make pass but they wanted the rebase to continue).  However,\nafter trying it out, I found:\n\n$ git rebase --exec /bin/false --reschedule-failed-exec HEAD~1\nExecuting: /bin/false\nwarning: execution failed: /bin/false\nYou can fix the problem, and then run\n\n  git rebase --continue\n\n\nhint: Could not execute the todo command\nhint: \nhint:     exec /bin/false\nhint: \nhint: It has been rescheduled; To edit the command before continuing, please\nhint: edit the todo list first:\nhint: \nhint:     git rebase --edit-todo\nhint:     git rebase --continue\n\nand if the user just runs \"git rebase --continue\" without looking at that big\nhint, they'll get the hint again.  When they run \"git rebase --edit-todo\", they\nsee the failed command listed first and can remove that line.\n\nSo, I think my initial worry was unfounded.\n\n \n> The obvious intent behind that config setting is to not only give users a\n> way to opt into that behavior already, but also to make it possible to flip\n> the default at a later date, after the feature has been battle-tested and\n> after deprecating the non-rescheduling behavior for a couple of Git\n> versions.\n> \n> If the team agrees with my reasoning, then the 3rd patch (introducing -y\n> <cmd> as a shortcut for --reschedule-failed-exec -x <cmd>) might not make\n> much sense, as it would introduce a short option that would become obsolete\n> soon.\n\nThis series is awesome; thanks much to Paul for suggesting this idea.\nAnd yeah, I agree and hope the third patch won't be necessary.  :-)\n\n> Johannes Schindelin (3):\n>   rebase: introduce --reschedule-failed-exec\n>   rebase: add a config option to default to --reschedule-failed-exec\n>   rebase: introduce a shortcut for --reschedule-failed-exec\n> \n>  Documentation/config/rebase.txt |  5 ++++\n>  Documentation/git-rebase.txt    | 11 +++++++++\n>  builtin/rebase--interactive.c   |  2 ++\n>  builtin/rebase.c                | 42 ++++++++++++++++++++++++++++++++-\n>  git-legacy-rebase.sh            | 24 ++++++++++++++++++-\n>  git-rebase--common.sh           |  1 +\n>  sequencer.c                     | 13 +++++++---\n>  sequencer.h                     |  1 +\n>  t/t3418-rebase-continue.sh      | 14 +++++++++++\n>  9 files changed, 108 insertions(+), 5 deletions(-)\n> \n> \n> base-commit: a1598010f775d82b5adf12c29d0f5bc9b41434c6\n> Published-As: https://github.com/gitgitgadget/git/releases/tags/pr-90%2Fdscho%2Freschedule-failed-exec-v1\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-90/dscho/reschedule-failed-exec-v1\n> Pull-Request: https://github.com/gitgitgadget/git/pull/90\n> -- \n> gitgitgadget\n"}]}