From patchwork Wed Mar 13 18:26:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phillip Wood X-Patchwork-Id: 10851621 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 586EC6C2 for ; Wed, 13 Mar 2019 18:26:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4116829F41 for ; Wed, 13 Mar 2019 18:26:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 322F429EE7; Wed, 13 Mar 2019 18:26:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6677B29EE7 for ; Wed, 13 Mar 2019 18:26:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726731AbfCMS0f (ORCPT ); Wed, 13 Mar 2019 14:26:35 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:39289 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725876AbfCMS0f (ORCPT ); Wed, 13 Mar 2019 14:26:35 -0400 Received: by mail-wr1-f68.google.com with SMTP id p8so3108039wrq.6 for ; Wed, 13 Mar 2019 11:26:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:reply-to:mime-version :content-transfer-encoding; bh=VwjKlSV3/G0fHg0KZYlVmB2nJwMSxMM6ub4qZPLmgns=; b=ARAjSusPdtOHYQvMyiYZe4Chbhr/DbRK46+J+YNqt11CIGr7AfsnepbLMlpP+Vt5sU CILOqKlE8FWLUSRYHuCkLZve3lnNizZf9qANvObz/6U+yYYkq3KvX0wAGL6HsNV/8VAY cGHJR0R3O6/hiQ7Zi2omeP/QTILn5mplbOJOlte//WkuhoAP86YUThze6UGPVDxW9VS4 GjMHFMTvJ5EILRj9YtFiBOCqCjad86UGCX7F9Vg8zgiAxCaTIxFlM8VZ/V8KBOe/z4Fk YnBIk6chpy96N8o/vsC2r00zxCDxx4c9M+YI9LDzJEJafgWAFb9xoYxIu+YnTXBMKQ7N aYyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :mime-version:content-transfer-encoding; bh=VwjKlSV3/G0fHg0KZYlVmB2nJwMSxMM6ub4qZPLmgns=; b=VU/SXh/2NbDaSOTWIXZGX3wCkoT25Nzzmm2RUuTDhu5ceXF+7H53J5Pl6F85gqZmzE GRKxH4uGkz3Uc4x2y0MNZ2eYOfgmY4YgA+ParI2smUJsnveU9DzJSQuhltzoYxSZ+Hzc RY/XZtuj01zUT4TAc5m7IcXWMdNlZ0YesPhQ6VYhfjKwAlHQbe2zTASeXUCI+Pqj1M91 KBj6BWu278P4l50ySNydfQVpVa9LQW86950IymMjlBGw8hTXtyrPalaAh6vIx6PnimXJ b/Asg0RWaFVuUQFQtVhy/ga9tImSCTvXo2vE5Mfii3rsC3g0iGQ2lyUfMLIdSTM/MWFI kkFg== X-Gm-Message-State: APjAAAXM62Dz1Jy6/uWLFu9mFV4kwnKA8GQpaeu8K+uwFDg25PH+BITX LTOr1ikPmUa+COaoP1MW0qQxsWPsnDeY/w== X-Google-Smtp-Source: APXvYqwzEezNWk6S3dz2XquNQe55rSmyYy42pzaOodGUeZQ9OVh+qN7m/uyO4E9LgFDgR220pWVZxQ== X-Received: by 2002:a5d:4702:: with SMTP id y2mr30991082wrq.149.1552501593154; Wed, 13 Mar 2019 11:26:33 -0700 (PDT) Received: from lindisfarne.localdomain (host-89-242-186-210.as13285.net. [89.242.186.210]) by smtp.gmail.com with ESMTPSA id i62sm2753807wmg.17.2019.03.13.11.26.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Mar 2019 11:26:32 -0700 (PDT) From: Phillip Wood To: Git Mailing List Cc: Junio C Hamano , Phillip Wood Subject: [PATCH 1/3] sequencer: break some long lines Date: Wed, 13 Mar 2019 18:26:13 +0000 Message-Id: <20190313182615.7351-1-phillip.wood123@gmail.com> X-Mailer: git-send-email 2.21.0 Reply-To: Phillip Wood MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Phillip Wood reformat save_opts() to remove excessively long lines. Signed-off-by: Phillip Wood --- sequencer.c | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/sequencer.c b/sequencer.c index 0db410d590..5e19b22f8f 100644 --- a/sequencer.c +++ b/sequencer.c @@ -2700,36 +2700,45 @@ static int save_opts(struct replay_opts *opts) int res = 0; if (opts->no_commit) - res |= git_config_set_in_file_gently(opts_file, "options.no-commit", "true"); + res |= git_config_set_in_file_gently(opts_file, + "options.no-commit", "true"); if (opts->edit) - res |= git_config_set_in_file_gently(opts_file, "options.edit", "true"); + res |= git_config_set_in_file_gently(opts_file, + "options.edit", "true"); if (opts->signoff) - res |= git_config_set_in_file_gently(opts_file, "options.signoff", "true"); + res |= git_config_set_in_file_gently(opts_file, + "options.signoff", "true"); if (opts->record_origin) - res |= git_config_set_in_file_gently(opts_file, "options.record-origin", "true"); + res |= git_config_set_in_file_gently(opts_file, + "options.record-origin", "true"); if (opts->allow_ff) - res |= git_config_set_in_file_gently(opts_file, "options.allow-ff", "true"); + res |= git_config_set_in_file_gently(opts_file, + "options.allow-ff", "true"); if (opts->mainline) { struct strbuf buf = STRBUF_INIT; strbuf_addf(&buf, "%d", opts->mainline); - res |= git_config_set_in_file_gently(opts_file, "options.mainline", buf.buf); + res |= git_config_set_in_file_gently(opts_file, + "options.mainline", buf.buf); strbuf_release(&buf); } if (opts->strategy) - res |= git_config_set_in_file_gently(opts_file, "options.strategy", opts->strategy); + res |= git_config_set_in_file_gently(opts_file, + "options.strategy", opts->strategy); if (opts->gpg_sign) - res |= git_config_set_in_file_gently(opts_file, "options.gpg-sign", opts->gpg_sign); + res |= git_config_set_in_file_gently(opts_file, + "options.gpg-sign", opts->gpg_sign); if (opts->xopts) { int i; for (i = 0; i < opts->xopts_nr; i++) res |= git_config_set_multivar_in_file_gently(opts_file, - "options.strategy-option", - opts->xopts[i], "^$", 0); + "options.strategy-option", + opts->xopts[i], "^$", 0); } if (opts->allow_rerere_auto) - res |= git_config_set_in_file_gently(opts_file, "options.allow-rerere-auto", - opts->allow_rerere_auto == RERERE_AUTOUPDATE ? - "true" : "false"); + res |= git_config_set_in_file_gently(opts_file, + "options.allow-rerere-auto", + opts->allow_rerere_auto == RERERE_AUTOUPDATE ? + "true" : "false"); return res; } From patchwork Wed Mar 13 18:26:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phillip Wood X-Patchwork-Id: 10851623 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EEA7B17EF for ; Wed, 13 Mar 2019 18:26:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D7A4629EE7 for ; Wed, 13 Mar 2019 18:26:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CB9B129F5A; Wed, 13 Mar 2019 18:26:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 757DF29EE7 for ; Wed, 13 Mar 2019 18:26:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726861AbfCMS0g (ORCPT ); Wed, 13 Mar 2019 14:26:36 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:40234 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726336AbfCMS0g (ORCPT ); Wed, 13 Mar 2019 14:26:36 -0400 Received: by mail-wr1-f68.google.com with SMTP id t5so3105998wri.7 for ; Wed, 13 Mar 2019 11:26:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=NIcfkaNBiRHR4be75oeKPp016U9aQBv75cXHRoemeHY=; b=b276+n9A422HcLMtfVde6rzPYCCMJ5fUvlgAAixyEf7tzJw7ovYdIUxWT2faD59+/P x211od7LhK//vBQDhFp/dOctirDHVElggpeO2Va8F3SlwkHZi33USICL8elCIbGCOAGl aHX2nmselgSxrh/QIQkmCx+QBFqPV9UHdrvb1Ctx38Lrdmw1eOtZeHStAguR8YK3NHdT wZaDacd1mQ0AO6lTM1FzhmV+Snbh9sdFvm8TstWE1UD3cFrytVk/c44WIsBYAvYn4i/e qVjgqgi6n7jjW4wRpnBwXspx7/jaPESak4F8h1CxFtOVYPfw0LrR8AIZM+ufgmmwIo/m oSKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=NIcfkaNBiRHR4be75oeKPp016U9aQBv75cXHRoemeHY=; b=Ss9KRENCQFrAVyIUTAuOZp7u7XddeLjcx4T+g9QNaBCat5QkCjzznpfafF/z3WSZMk NduimDgCr+81W4jdWbn9b3HBskJqgxVPPTRAhMgfaY9YRXgETTbCDg/T0QeBoqbY+jlx Y6KDdPPPr+KW/sm+sCPE0xjWYAmGnO+uZCoESAwpNMJzVQ2ahCSc+1k3YC7MPen+sLbb Wiiloby16PWO/n4SeXYqM254UfxmmQ/fFRoc3fhRaayUD24yhtkC2ojWK+fCmAn0sD8J eCr6zxBrNhHaAx9DuNMrsdATzFlpsHnz4xxNKOCwC899Vekvl9rQOMpGM/CuPjThNCH6 VEUg== X-Gm-Message-State: APjAAAUCexlLUyw4wMJMaCStT9W5X7rCrx3lFep8aIlphM757rqJY5Z4 gpYJ5OrVpkb62AiEIJpzI2gffjywUJNKZg== X-Google-Smtp-Source: APXvYqxfOiUd0ynMdBleCxz/GO/eOfTumtZ3V4NbgokN3CJQKgq8rzgvPrdYp0rRL3U6+SKrImSp2w== X-Received: by 2002:adf:e5d2:: with SMTP id a18mr14044256wrn.34.1552501594087; Wed, 13 Mar 2019 11:26:34 -0700 (PDT) Received: from lindisfarne.localdomain (host-89-242-186-210.as13285.net. [89.242.186.210]) by smtp.gmail.com with ESMTPSA id i62sm2753807wmg.17.2019.03.13.11.26.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Mar 2019 11:26:33 -0700 (PDT) From: Phillip Wood To: Git Mailing List Cc: Junio C Hamano , Phillip Wood Subject: [PATCH 2/3] cherry-pick: demonstrate option amnesia Date: Wed, 13 Mar 2019 18:26:14 +0000 Message-Id: <20190313182615.7351-2-phillip.wood123@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190313182615.7351-1-phillip.wood123@gmail.com> References: <20190313182615.7351-1-phillip.wood123@gmail.com> Reply-To: Phillip Wood MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Phillip Wood When cherry-pick stops for a conflict resolution it forgets --allow-empty --allow-empty-message and --keep-redundant-commits. Signed-off-by: Phillip Wood --- t/t3507-cherry-pick-conflict.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/t/t3507-cherry-pick-conflict.sh b/t/t3507-cherry-pick-conflict.sh index 0db166152a..79e994cffa 100755 --- a/t/t3507-cherry-pick-conflict.sh +++ b/t/t3507-cherry-pick-conflict.sh @@ -25,6 +25,11 @@ test_expect_success setup ' test_commit base foo b && test_commit picked foo c && test_commit --signoff picked-signed foo d && + git checkout -b topic initial && + test_commit redundant-pick foo c redundant && + git commit --allow-empty --allow-empty-message && + git tag empty && + git checkout master && git config advice.detachedhead false ' @@ -405,4 +410,23 @@ test_expect_success 'cherry-pick preserves sparse-checkout' ' test_i18ngrep ! "Changes not staged for commit:" actual ' +test_expect_failure 'cherry-pick --continue remembers --keep-redundant-commits' ' + test_when_finished "git cherry-pick --abort || :" && + pristine_detach initial && + test_must_fail git cherry-pick --keep-redundant-commits picked redundant && + echo c >foo && + git add foo && + git cherry-pick --continue +' + +test_expect_failure 'cherry-pick --continue remembers --allow-empty and --allow-empty-message' ' + test_when_finished "git cherry-pick --abort || :" && + pristine_detach initial && + test_must_fail git cherry-pick --allow-empty --allow-empty-message \ + picked empty && + echo c >foo && + git add foo && + git cherry-pick --continue +' + test_done From patchwork Wed Mar 13 18:26:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phillip Wood X-Patchwork-Id: 10851625 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8F2E61669 for ; Wed, 13 Mar 2019 18:26:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A1C229EE7 for ; Wed, 13 Mar 2019 18:26:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6E1C029F5A; Wed, 13 Mar 2019 18:26:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B96429EE7 for ; Wed, 13 Mar 2019 18:26:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726865AbfCMS0j (ORCPT ); Wed, 13 Mar 2019 14:26:39 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:41815 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725876AbfCMS0h (ORCPT ); Wed, 13 Mar 2019 14:26:37 -0400 Received: by mail-wr1-f68.google.com with SMTP id p1so3098665wrs.8 for ; Wed, 13 Mar 2019 11:26:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=2i2YbpiZkC4YQl2ZkXB7HkCKa246LtYK3tFaRmnA7Gw=; b=CqJ2b8Sl/lM3rdAo6kElAyICMMZYNcMvlAq0vsgXqI1LqVnbqxHHv9S69qOqR8/BXF O+3A5iVVi341J/5s3FzBMvcFnA56FVoBXABlGzuIojctMI7gX/qJjS+I0uQTSMvwCvW3 fTy49J4Y+FW6aPSkgQ6iY7jy0Oai7ssJ/c2lLKpx6RzH2Kqcj/ySExKKhAPI77jl43hl 8yBXHZIhohO0jvIeXKSjbYiLAqcOQLCaWO/7upVJ6r2e+HLuS7SFW6vuYK3noMn0UryE 9YwOR7mfaTg1WRrARJdnDnaz2IZrR3V/a3uBukkChQPOC/9oAg32ZJu/KaupC6ZS9i4d PNAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=2i2YbpiZkC4YQl2ZkXB7HkCKa246LtYK3tFaRmnA7Gw=; b=VKLYrgkSQas2Py8RaFCotGfvtSH0g/42BymoV9drKPYYQXvWb5dZkZdYpqztarD1sB mEib17JIlDiyUT6mkxP7vubdNPKZjxjYCSar6sSM5Kk6LHa7RIvmxkZ0JVagJPl/s0k8 8lh1RSNplolUjjDLfsiFKykRsVA8tGdHrgc6hTS87ln7LZ9DaA9hXEryhPMX+NYoF1Js efbOjaKcvgeVH1wOcDoORpwDiKyDasKhyklV+PWKkdpDHwaJwXyy2i3qMUyL0/YcqF6K Pw57lOnY0F/U0VUyVI8vvvoOiRxU0mz6YIOLwAngHZ9onCVvk4XEjywyDV04svUK6z2+ 7eww== X-Gm-Message-State: APjAAAUvqzhEZue/uNU9DXrFJv1qB+EJ5W+FBt0iNDNtt98lDdS8FW2I kfeyXdnVafbcrxgmm7JRr6dkvFJkQos4hg== X-Google-Smtp-Source: APXvYqwGUc/20vUWD2CAQ4raH/FQ+8yQU1tKDcTWZPGs2JGykTkRiR2xdv2mLpvsqZiQwD8qfrKFHg== X-Received: by 2002:adf:f54b:: with SMTP id j11mr4950189wrp.39.1552501595213; Wed, 13 Mar 2019 11:26:35 -0700 (PDT) Received: from lindisfarne.localdomain (host-89-242-186-210.as13285.net. [89.242.186.210]) by smtp.gmail.com with ESMTPSA id i62sm2753807wmg.17.2019.03.13.11.26.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Mar 2019 11:26:34 -0700 (PDT) From: Phillip Wood To: Git Mailing List Cc: Junio C Hamano , Phillip Wood Subject: [PATCH 3/3] cherry-pick --continue: remember options Date: Wed, 13 Mar 2019 18:26:15 +0000 Message-Id: <20190313182615.7351-3-phillip.wood123@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190313182615.7351-1-phillip.wood123@gmail.com> References: <20190313182615.7351-1-phillip.wood123@gmail.com> Reply-To: Phillip Wood MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Phillip Wood Remember --allow-empty, --allow-empty-message and --keep-redundant-commits when cherry-pick stops for a conflict resolution. Signed-off-by: Phillip Wood --- sequencer.c | 18 ++++++++++++++++++ t/t3507-cherry-pick-conflict.sh | 4 ++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/sequencer.c b/sequencer.c index 5e19b22f8f..1ad51aa498 100644 --- a/sequencer.c +++ b/sequencer.c @@ -2307,6 +2307,15 @@ static int populate_opts_cb(const char *key, const char *value, void *data) opts->no_commit = git_config_bool_or_int(key, value, &error_flag); else if (!strcmp(key, "options.edit")) opts->edit = git_config_bool_or_int(key, value, &error_flag); + else if (!strcmp(key, "options.allow-empty")) + opts->allow_empty = + git_config_bool_or_int(key, value, &error_flag); + else if (!strcmp(key, "options.allow-empty-message")) + opts->allow_empty_message = + git_config_bool_or_int(key, value, &error_flag); + else if (!strcmp(key, "options.keep-redundant-commits")) + opts->keep_redundant_commits = + git_config_bool_or_int(key, value, &error_flag); else if (!strcmp(key, "options.signoff")) opts->signoff = git_config_bool_or_int(key, value, &error_flag); else if (!strcmp(key, "options.record-origin")) @@ -2705,6 +2714,15 @@ static int save_opts(struct replay_opts *opts) if (opts->edit) res |= git_config_set_in_file_gently(opts_file, "options.edit", "true"); + if (opts->allow_empty) + res |= git_config_set_in_file_gently(opts_file, + "options.allow-empty", "true"); + if (opts->allow_empty_message) + res |= git_config_set_in_file_gently(opts_file, + "options.allow-empty-message", "true"); + if (opts->keep_redundant_commits) + res |= git_config_set_in_file_gently(opts_file, + "options.keep-redundant-commits", "true"); if (opts->signoff) res |= git_config_set_in_file_gently(opts_file, "options.signoff", "true"); diff --git a/t/t3507-cherry-pick-conflict.sh b/t/t3507-cherry-pick-conflict.sh index 79e994cffa..1ef8e9d534 100755 --- a/t/t3507-cherry-pick-conflict.sh +++ b/t/t3507-cherry-pick-conflict.sh @@ -410,7 +410,7 @@ test_expect_success 'cherry-pick preserves sparse-checkout' ' test_i18ngrep ! "Changes not staged for commit:" actual ' -test_expect_failure 'cherry-pick --continue remembers --keep-redundant-commits' ' +test_expect_success 'cherry-pick --continue remembers --keep-redundant-commits' ' test_when_finished "git cherry-pick --abort || :" && pristine_detach initial && test_must_fail git cherry-pick --keep-redundant-commits picked redundant && @@ -419,7 +419,7 @@ test_expect_failure 'cherry-pick --continue remembers --keep-redundant-commits' git cherry-pick --continue ' -test_expect_failure 'cherry-pick --continue remembers --allow-empty and --allow-empty-message' ' +test_expect_success 'cherry-pick --continue remembers --allow-empty and --allow-empty-message' ' test_when_finished "git cherry-pick --abort || :" && pristine_detach initial && test_must_fail git cherry-pick --allow-empty --allow-empty-message \