From ce11237046a1af9728f7d0544c6aae8eb1d5c7d3 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Sat, 9 Jul 2011 10:56:30 -0400 Subject: apply: add --continue/--skip/--abort Rather than failing completely when git-am fails to apply a patch, write out our current state to git-am's temporary directory, and then tell the user to use "git bz apply --continue/--skip/--abort" after handling the merge failure. When the user uses one of those options, read back our state, pass the flag on to git-am, and (assuming git-am succeeds), continue with the next patch. https://bugzilla.gnome.org/show_bug.cgi?id=657558 --- git-bz.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'git-bz.txt') diff --git a/git-bz.txt b/git-bz.txt index 0dcf7f7..2fa298f 100644 --- a/git-bz.txt +++ b/git-bz.txt @@ -10,6 +10,7 @@ SYNOPSIS [verse] 'git bz add-url' ( | ) 'git bz apply' [-n | --no-add-url] +'git bz apply' (--continue | --skip | --abort) 'git bz attach' [-n | --no-add-url] [-e |--edit] [] ( | ) 'git bz components' [] 'git bz edit' ( | | ) @@ -132,7 +133,9 @@ section <> below for how to change this. apply ~~~~~ +[verse] 'git bz apply' [-n | --no-add-url] +'git bz apply' (--continue | --skip | --abort) Lists all "pending" patches on the specified bug (ie, the patches that are not obsolete, committed, or rejected), and then prompts whether to @@ -140,7 +143,14 @@ apply them. In addition to simply accepting or rejecting the list of patches, you can also type "i" to interactively choose which patches to apply, and in what order, as with 'git rebase -i'. If any patches are selected, it runs 'git am' on each one to apply it to the current -branch. Aborts if 'git am' fails, to allow cleaning up conflicts. +branch. + +If a 'git am' operation fails, 'git bz apply' will save its state and +then exit, at which point you can attempt to apply the patch by hand +and then resume with 'git bz apply --continue'; skip this patch but +continue applying the remaining patches with 'git bz apply --skip'; or +abort the operation and return to the original tree state with 'git bz +apply --abort'. Examples: -- cgit v1.2.3