When calling `git pull --rebase`, things can go wrong. In such a case,
we want to tell the user about the most common ways out of this fix:

        Patch failed at [...]
        [...]

        When you have resolved this problem, run "git rebase
        --continue". If you prefer to skip this patch, run "git rebase
        --skip" instead. To check out the original branch and stop
        rebasing, run "git rebase --abort".

However, with the switch to the builtin `git-am` we call the merge
recursive function directly, which usually die()s in case of an
error. Not what we want.

So let's set the newly-introduced `gentle` flag to get a chance to
print the helpful advice.

Reported by Brendan Forster.

Signed-off-by: Johannes Schindelin <johannes.schinde...@gmx.de>
---
 builtin/am.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/builtin/am.c b/builtin/am.c
index 4f77e07..c472937 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -1653,6 +1653,7 @@ static int fall_back_threeway(const struct am_state 
*state, const char *index_pa
 
        init_merge_options(&o);
 
+       o.gentle = 1;
        o.branch1 = "HEAD";
        his_tree_name = xstrfmt("%.*s", linelen(state->msg), state->msg);
        o.branch2 = his_tree_name;
-- 
2.6.1.windows.1


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to