nixpkgs-ml-tools

nixpkgs mailing list tools
git clone git://jb55.com/nixpkgs-ml-tools
Log | Files | Refs | README | LICENSE

commit 86e142750a20ddb9841899c9cd7af3eb3a7ddfeb
parent 5b31bcaafe23708fc8b442471765820b69c8473b
Author: Matthias Beyer <mail@beyermatthias.de>
Date:   Thu,  1 Apr 2021 20:39:48 +0200

Add support for calling git-am with -s

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Link: https://lore.kernel.org/r/20210401183949.25894-5-mail@beyermatthias.de

Diffstat:
Mnotmuch-am | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/notmuch-am b/notmuch-am @@ -27,6 +27,7 @@ _positionals=() # THE DEFAULTS INITIALIZATION - OPTIONALS _arg_am="off" _arg_3="off" +_arg_amsignoff="off" print_help() @@ -36,6 +37,7 @@ print_help() printf '\t%s\n' "<thread-id>: The notmuch thread id of the thread to apply" printf '\t%s\n' "--am, --no-am: Call git-am instead of generating a mbox file (off by default)" printf '\t%s\n' "-3: Call git-am with -3 (off by default, only effective with --am)" + printf '\t%s\n' "-s, --signoff: Call git-am with --signoff (off by default, only effective with --am)" printf '\t%s\n' "-h, --help: Prints help" printf %s "\ @@ -72,6 +74,9 @@ parse_commandline() -3) _arg_3="on" ;; + -s|--signoff) + _arg_amsignoff="on" + ;; *) _last_positional="$1" _positionals+=("$_last_positional") @@ -129,6 +134,9 @@ main () { if [[ "$_arg_3" == "on" ]]; then AM_ARGS="-3" fi + if [[ "$_arg_amsignoff" == "on" ]]; then + AM_ARGS+=" --signoff" + fi b4 am "$msgid" -m "$mbox" -o - | git am $AM_ARGS else