Paul Tan <pyokagan@xxxxxxxxx> writes: > Let command-line options override saved options in git-am when resuming > > This is a re-roll of [v1]. Previous versions: > > [v1] http://thread.gmane.org/gmane.comp.version-control.git/274789 > > When resuming, git-am mistakenly ignores command-line options. > > For instance, when a patch fails to apply with "git am patch", subsequently > running "git am --3way" would not cause git-am to fall back on attempting a > threeway merge. This occurs because by default the --3way option is saved as > "false", and the saved am options are loaded after the command-line options are > parsed, thus overwriting the command-line options when resuming. > > [PATCH 1/3] tweaks test-terminal.perl to redirect the stdin of the child > process to a pty. This is to support the tests in [PATCH 2/3]. > > [PATCH 2/3] fixes builtin/am.c, enabling command-line options to override saved > options. However, even with this patch, the following command-line options have > no effect when resuming: > > * --signoff overriding --no-signoff > > * --no-keep overriding --keep > > * --message-id overriding --no-message-id > > * --scissors overriding --no-scissors > > This is because they are only taken into account during the mail-parsing stage, > which is skipped over when resuming. It is more like "which has already happened", so I would tend to think that these are the right things to ignore. Otherwise, a pretty common sequence would not work well ... $ git am mbox ... conflicted ... $ edit .git/rebase-apply/patch $ git am ... if the "resuming" invocation re-split the message by running mailinfo again, the edit by the user will be lost. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html