From patchwork Tue Aug 27 04:45:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 11116033 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D52EB14E5 for ; Tue, 27 Aug 2019 04:45:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B382D2070B for ; Tue, 27 Aug 2019 04:45:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="N+Ku5aAd" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726134AbfH0Epk (ORCPT ); Tue, 27 Aug 2019 00:45:40 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:40241 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725766AbfH0Epk (ORCPT ); Tue, 27 Aug 2019 00:45:40 -0400 Received: by mail-io1-f67.google.com with SMTP id t6so43212954ios.7 for ; Mon, 26 Aug 2019 21:45:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=7GYwZSmNkJA7qLEr5X341A9jJ/weY7cRYvFm1vBdq20=; b=N+Ku5aAdWuvmXxZnIu6HzYoK2ALk4a1JrOwj55BgOUqoUQ/wUVVZu+63kC4+lvIM4j A710ki7QQjvzm5zoBlo27IepbTI54+G0UUbI8ArH7Hl5w7c7jZ3driw5RA+1FcPFoVzz uMyN6T0TBayb8idvMNCnQTxjJTsgnNwMrRTu8n2Sl8K3h3ZBgZy8ykTNFOVvWkKgz5hG GEXAWii6Po3UVwfnnMt4FX3KNXmGjyWoTylEVcExgmTh+9jGyGvWLL8YM8iKI2771TSf l7JoNns5E8CZot6Bi5sm18z/C8s8Dpd9i4xjXuGJXP2ZdjmdWMERaHkpQrxt4vOSrhhR /jnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=7GYwZSmNkJA7qLEr5X341A9jJ/weY7cRYvFm1vBdq20=; b=P/rLLJlT9Jjq0Bfmh0da4xOo8SOkxY9na+sJQjyPYsSQETQKE1cout0GjKcsgaOcLz 7s1r9BjWoGSAqVUMeHfMMW5W7YkbfDHfSXRAuZMWdpGWGxKAHVMhSA0NVBym81Cf6mKy HDbZuZyWl9KeBUGDYLFMPcCYwPbuKCzASBe3RCchz7unp38B4Z14/IW4DSX3pVhyFtLM 9XHBxtw9o45d9cvxkAhYcixA/LFbnZtqOCp6pzVdR9EHlnUmd7H0hKrsZCBX+/AyxkIX t5jS2ju3FYtku/l2ns1ItxIpg+EyPOtCvZP6Kr4G74kxd1v83Z/edQC9sddYN6xKb6KB qyeg== X-Gm-Message-State: APjAAAWlxx+EdvxtH8fxl3zAmnShONyysf/5DJl1oRTMFzYfnhD3rfBj QkESnVrQDYe7txcNS4VdlqBnJRxS X-Google-Smtp-Source: APXvYqxHEqpY1EoSrMKilptB3gCFpsuJrBgPcQM7QmPkyekbxi4zRxomG3jt2ww/a9lGuwdBofMhtg== X-Received: by 2002:a02:a11e:: with SMTP id f30mr21536358jag.0.1566881139045; Mon, 26 Aug 2019 21:45:39 -0700 (PDT) Received: from archbookpro.localdomain (CPE18593399858a-CM185933998587.cpe.net.cable.rogers.com. [174.112.89.95]) by smtp.gmail.com with ESMTPSA id s6sm11259023ioe.6.2019.08.26.21.45.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2019 21:45:38 -0700 (PDT) Date: Tue, 27 Aug 2019 00:45:36 -0400 From: Denton Liu To: Git Mailing List Cc: Junio C Hamano Subject: [PATCH v2 1/3] completion: merge options for cherry-pick and revert Message-ID: <862802366ab2dc636614b737bbb5d4fe26dba9e4.1566880835.git.liu.denton@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Since revert and cherry-pick share the same sequencer code, they should both accept the same command-line options. Derive the `__git_cherry_pick_inprogress_options` and `__git_revert_inprogress_options` variables from `__git_sequencer_inprogress_options` so that the options aren't unnecessarily duplicated twice. Signed-off-by: Denton Liu --- contrib/completion/git-completion.bash | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index e087c4bf00..a7d3f58627 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1361,7 +1361,9 @@ _git_checkout () esac } -__git_cherry_pick_inprogress_options="--continue --quit --abort" +__git_sequencer_inprogress_options="--continue --quit --abort" + +__git_cherry_pick_inprogress_options=$__git_sequencer_inprogress_options _git_cherry_pick () { @@ -2512,7 +2514,7 @@ _git_restore () esac } -__git_revert_inprogress_options="--continue --quit --abort" +__git_revert_inprogress_options=$__git_sequencer_inprogress_options _git_revert () { From patchwork Tue Aug 27 04:45:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 11116035 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0CE1818B7 for ; Tue, 27 Aug 2019 04:45:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DF48D20828 for ; Tue, 27 Aug 2019 04:45:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Dw0dwNyf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726833AbfH0Epm (ORCPT ); Tue, 27 Aug 2019 00:45:42 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:43023 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725766AbfH0Epm (ORCPT ); Tue, 27 Aug 2019 00:45:42 -0400 Received: by mail-io1-f68.google.com with SMTP id 18so43123913ioe.10 for ; Mon, 26 Aug 2019 21:45:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=kKoezlPeroE0lOvzpwrLCwn9Zih3h/izUPPa722c01U=; b=Dw0dwNyfXo7b4ijdTuvLvrDKjPG1bnGj7XvHPI2pWIjI+DFjRbQ+3AFU8r11/SGUhK p6r5dQlqMfAEtkfOhsmhKzz8wS57ovUPoDkhTVOdOE6Jpb3YEiKGvooAxqXaAT8464o5 LzjyP2EHHzr5zdKaz0lVQbuubeWZEdndCLt75oGwoQ3zENQRR1+o6xxStm9my+uZYlKt hdJjH0geXLWoLgudHmROjpxvGbZpRTM4sk9CTL6bEWu8KBfRtISG5AN/nT+k9mVa/75l mnksBQzinXjqfQuOp4v5xnKhtzc1BzcFYEMXpgt/2/g0DbKHoNzSrQ5GJgLspy8LNlup d2fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=kKoezlPeroE0lOvzpwrLCwn9Zih3h/izUPPa722c01U=; b=LvcVWR1UGJiK5JdiHed54KPvweaPrgw9poHvoDcZlD4uXJqdfURU3J2B4kUyJUe9Ls ZbR7F+xxYIcBKTMEM4jgBQCXTBdqvdFF3yjUG3tOf/WobxqkqRbn4HkEPwL4PCCgy9CA S//5mQn2wc90piOxwSOZcTtLCioWQR8Jq+kEOH4MrAaHQhOGJIdzKtFT7WVrZy6UbaC+ ZIzIKzmRpgp3jzBu2bYwVlAoeYBvA2jbtanG14OksyYWKsy2/S1i5BAoKgIMsSMU2RL0 gwco+cbv3mIUnl4LFYQGYgSHnYbRErMRc8yCxpXMxFk6IB7BmGikrLSE3cbmRkZF9IHk ywkA== X-Gm-Message-State: APjAAAWxeZcH9eo5EawjtgAdbeMXPk30CrXTUbm9sadoBdsfFTmRDaEs /IX4JHkY3lqzvu/JULriOFBdLdfd X-Google-Smtp-Source: APXvYqzkboqx5iv7RD38IOlpx83TyCQMTjDjKtMl+hwYIQsOY59vV/eU/XGnzJIy/YR3987BOVN3GQ== X-Received: by 2002:a5e:9917:: with SMTP id t23mr1698338ioj.23.1566881141464; Mon, 26 Aug 2019 21:45:41 -0700 (PDT) Received: from archbookpro.localdomain (CPE18593399858a-CM185933998587.cpe.net.cable.rogers.com. [174.112.89.95]) by smtp.gmail.com with ESMTPSA id y25sm23166987iol.59.2019.08.26.21.45.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2019 21:45:41 -0700 (PDT) Date: Tue, 27 Aug 2019 00:45:39 -0400 From: Denton Liu To: Git Mailing List Cc: Junio C Hamano Subject: [PATCH v2 2/3] completion: add --skip for cherry-pick and revert Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Even though `--skip` is a valid command-line option for cherry-pick and revert while they are in progress, it is not completed. Add this missing option to the completion script. Signed-off-by: Denton Liu --- contrib/completion/git-completion.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index a7d3f58627..b4651411b2 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1361,7 +1361,7 @@ _git_checkout () esac } -__git_sequencer_inprogress_options="--continue --quit --abort" +__git_sequencer_inprogress_options="--continue --quit --abort --skip" __git_cherry_pick_inprogress_options=$__git_sequencer_inprogress_options From patchwork Tue Aug 27 04:45:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 11116037 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 391D01800 for ; Tue, 27 Aug 2019 04:45:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 16EFE2070B for ; Tue, 27 Aug 2019 04:45:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LGZbcyu7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729082AbfH0Epp (ORCPT ); Tue, 27 Aug 2019 00:45:45 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:46320 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725766AbfH0Epo (ORCPT ); Tue, 27 Aug 2019 00:45:44 -0400 Received: by mail-io1-f67.google.com with SMTP id x4so43049942iog.13 for ; Mon, 26 Aug 2019 21:45:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XzDkT5I+h6QBHxtxLdCVXB/0avvWcRukXe+OVuGmFJA=; b=LGZbcyu7yUf8xt9iIvWDqNnP9TVjWGcvJyzGgmbjZUxbnYmmDc0OCHuwa7Fk393oSB 6LBQ/6uiAhDxsXUTbApDaQA8E+sM5TEyx3PBN+PPyfBhfjMMAB+eFHUsaRdUzwbUEpfj zcoRFsR3DbVfF9BJhKOn+3JUp4DfQoLha3NXHNvu2SqcKBMexDuAvr7HYxi0Il3wEk7U bftzFmtKqtFTdv0VatJ5nAWDGB2NtWqkXBRIo5e8lb1PlktqDjJdcHfhaZFsGiD1d4o2 IcD75aGYKRcXwm9ptk5260Le5nkDfcWBUCMAlSvvng5xC7C14biT8YVrgNVdUOtQ12SC OhlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=XzDkT5I+h6QBHxtxLdCVXB/0avvWcRukXe+OVuGmFJA=; b=CqgRx8zgzpoNhTyAJmRex3dQfSLL6eJqozFIXZfVM2vqumGd6j1pJFjhUps0BJR1rQ wg4O3UukjaucRUMd8NSFArdF797bGajTyf1i6Zu9Zvvd05rbasq7V3MWr2pngu8/kisi VgP8AOTH+LBfrz0RBUjD79VtFpttoDWtHLiGSsLCmYmk5KlYVyw+bNN7jyh4Qr0pV90v gDIfYAwRzMn4T2KUpVwOnpZnvg+wzo2CdnZpg787SXC9CSrV2stSxVm+elJ1pOmWlXgR sV8YGRFWAyf2DFi9SOejfTrkX9knwMF2J3CA03dQNO0b4MNOUjrNj2y7Ydj4ojmXFgHp FetQ== X-Gm-Message-State: APjAAAW3V3IxVOYlB/5/4J7DOMePzvWmEh76CMGxidkLxn6ZI7Bo2B6o 8DVHtNFAWbg4l9Ew/uRsFDyH4aKa X-Google-Smtp-Source: APXvYqwNsDibWQPGFosyR12R5OAl7gWT563DmwMxa2eU07Gbx0BexKiXlm+Ep4Y8NJTI+iT5tBygSg== X-Received: by 2002:a6b:8d90:: with SMTP id p138mr16035960iod.282.1566881143656; Mon, 26 Aug 2019 21:45:43 -0700 (PDT) Received: from archbookpro.localdomain (CPE18593399858a-CM185933998587.cpe.net.cable.rogers.com. [174.112.89.95]) by smtp.gmail.com with ESMTPSA id j16sm11878711iok.34.2019.08.26.21.45.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2019 21:45:43 -0700 (PDT) Date: Tue, 27 Aug 2019 00:45:41 -0400 From: Denton Liu To: Git Mailing List Cc: Junio C Hamano Subject: [PATCH v2 3/3] status: mention --skip for revert and cherry-pick Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org When reverting or cherry-picking, one of the options we can pass the sequencer is `--skip`. However, unlike rebasing, `--skip` is not mentioned as a possible option in the status message. Mention it so that users are more aware of their options. Signed-off-by: Denton Liu --- t/t7512-status-help.sh | 6 ++++++ wt-status.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh index e01c285cbf..66d7a62797 100755 --- a/t/t7512-status-help.sh +++ b/t/t7512-status-help.sh @@ -733,6 +733,7 @@ test_expect_success 'status when cherry-picking before resolving conflicts' ' On branch cherry_branch You are currently cherry-picking commit $TO_CHERRY_PICK. (fix conflicts and run "git cherry-pick --continue") + (use "git cherry-pick --skip" to skip this patch) (use "git cherry-pick --abort" to cancel the cherry-pick operation) Unmerged paths: @@ -757,6 +758,7 @@ test_expect_success 'status when cherry-picking after resolving conflicts' ' On branch cherry_branch You are currently cherry-picking commit $TO_CHERRY_PICK. (all conflicts fixed: run "git cherry-pick --continue") + (use "git cherry-pick --skip" to skip this patch) (use "git cherry-pick --abort" to cancel the cherry-pick operation) Changes to be committed: @@ -778,6 +780,7 @@ test_expect_success 'status when cherry-picking after committing conflict resolu On branch cherry_branch Cherry-pick currently in progress. (run "git cherry-pick --continue" to continue) + (use "git cherry-pick --skip" to skip this patch) (use "git cherry-pick --abort" to cancel the cherry-pick operation) nothing to commit (use -u to show untracked files) @@ -835,6 +838,7 @@ test_expect_success 'status while reverting commit (conflicts)' ' On branch master You are currently reverting commit $TO_REVERT. (fix conflicts and run "git revert --continue") + (use "git revert --skip" to skip this patch) (use "git revert --abort" to cancel the revert operation) Unmerged paths: @@ -855,6 +859,7 @@ test_expect_success 'status while reverting commit (conflicts resolved)' ' On branch master You are currently reverting commit $TO_REVERT. (all conflicts fixed: run "git revert --continue") + (use "git revert --skip" to skip this patch) (use "git revert --abort" to cancel the revert operation) Changes to be committed: @@ -887,6 +892,7 @@ test_expect_success 'status while reverting after committing conflict resolution On branch master Revert currently in progress. (run "git revert --continue" to continue) + (use "git revert --skip" to skip this patch) (use "git revert --abort" to cancel the revert operation) nothing to commit (use -u to show untracked files) diff --git a/wt-status.c b/wt-status.c index 9f6c65a580..ad6282c7f8 100644 --- a/wt-status.c +++ b/wt-status.c @@ -1433,6 +1433,8 @@ static void show_cherry_pick_in_progress(struct wt_status *s, else status_printf_ln(s, color, _(" (all conflicts fixed: run \"git cherry-pick --continue\")")); + status_printf_ln(s, color, + _(" (use \"git cherry-pick --skip\" to skip this patch)")); status_printf_ln(s, color, _(" (use \"git cherry-pick --abort\" to cancel the cherry-pick operation)")); } @@ -1460,6 +1462,8 @@ static void show_revert_in_progress(struct wt_status *s, else status_printf_ln(s, color, _(" (all conflicts fixed: run \"git revert --continue\")")); + status_printf_ln(s, color, + _(" (use \"git revert --skip\" to skip this patch)")); status_printf_ln(s, color, _(" (use \"git revert --abort\" to cancel the revert operation)")); }