am: let command-line options override saved options
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest posting 2/23 patches 7 repliesIn review
- v2 posting 1/20 of 3 patches 1 replySuperseded
- v11 patch 5 repliesSuperseded
Patches in v2 posting 2/2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | test_terminal: redirect child process' stdin to a ptyt/ | +20 | 2 replies | |
| 2/3 | am: let command-line options override saved optionsbuiltin/ t/ | +94 | 0 replies | |
| 3/3 | am: let --signoff override --no-signoffbuiltin/ t/ | +45 | 3 replies |
Reviews trailers per patch
None of the 3 patches has a Reviewed-by or Acked-by.
| Patch | Junio C Hamano | Jeff King |
|---|---|---|
| 1/3 | ||
| 2/3 | Noticed-by Helped-by | Helped-by |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/3] am: let command-line options override saved options
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.
[PATCH 3/3] adds support for the --signoff option when resuming by recognizing that we can (re-)append the signoff when the user explicitly specifies the --signoff option.
Since the --keep, --message-id and --scissors options are handled by git-mailinfo, it is tricky to implement support for them without introducing lots of code complexity, and thus this patch series does not attempt to.
Furthermore, it is hard to imagine a use case for e.g. --scissors overriding --no-scissors, and hence it might be preferable to wait until someone comes with a solid use case, instead of implementing potentially undesirable behavior and having to support it.
Paul Tan (3):
test_terminal: redirect child process' stdin to a pty
am: let command-line options override saved options
am: let --signoff override --no-signoff
builtin/am.c | 42 ++++++++++++--- t/t4153-am-resume-override-opts.sh | 102 +++++++++++++++++++++++++++++++++++++ t/test-terminal.perl | 25 +++++++-- 3 files changed, 158 insertions(+), 11 deletions(-) create mode 100755 t/t4153-am-resume-override-opts.sh
Signature · 1 line
2.5.0.280.gd88bd6e