From patchwork Sun Feb 7 18:14:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charvi Mendiratta X-Patchwork-Id: 12073271 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 184CAC433E0 for ; Sun, 7 Feb 2021 18:19:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DD96364D9E for ; Sun, 7 Feb 2021 18:19:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229590AbhBGSTh (ORCPT ); Sun, 7 Feb 2021 13:19:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229491AbhBGSTf (ORCPT ); Sun, 7 Feb 2021 13:19:35 -0500 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D06DC061756 for ; Sun, 7 Feb 2021 10:18:55 -0800 (PST) Received: by mail-pg1-x52b.google.com with SMTP id o7so8815137pgl.1 for ; Sun, 07 Feb 2021 10:18:55 -0800 (PST) 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 :mime-version:content-transfer-encoding; bh=hkVWdNQiQTnGfiwViD6nDYqlHF5k8u66zHfNdY58TMY=; b=RzjYY1arwXM1GEfy/ocvlkHX+x/dQQ+49Ci9gIt2bvoN2sND+qZFeUsW/Bd2coOT9I 8ndjQzX3K0N3CF6910JxbPKt218siikf/gshIThkxFAV2uZeMYxBHW69pi9J5mXDkK1x /mMsotqUoKn51hPEd3Ax/6g2i1qjhJxU9BZKgGiRTCBGBscpVIEAUctSL7T0VReLnrKa PzyC1o38+444svvwGJ9JIXDkdsP8tA6RHn7ia2Ah8rjBc4v64Or71iuO4yQ2HQaxg/G8 8LRdwdXWvZuqjRqG9TY+SrfJvxnC7NY1Cdit+wJGQRc+f6xqYPH++T2+adQ86gKalBRu RCXA== 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:mime-version:content-transfer-encoding; bh=hkVWdNQiQTnGfiwViD6nDYqlHF5k8u66zHfNdY58TMY=; b=WHUTFzJyZZTFV5FAv2Oq5UQZ4vl8W5nEHXEMlglJrWZQN+FaTc6Ks6fZr194UObT9D 45sGDyzgUSONtFjpeKhHAkYZbmBUKyRTfcao62kRVYV1M5n8CAuCtiwfAskuQYKuSuSZ W9FSCzvu0N8j1DSOt2SEPovMAK3bcIW/s3ExB7BvV/O+gcRLNfqCxfYwb+I7fG/u0mrH Dijcm1VnEQBKO/E0YZgG2lqyxX9Q+2xlIzMiqBi6bLsvGXozZ9GjdZyHLvdldeZsrVs5 9FYdgYDVY3+D2lmrZk1aQlLug505L0F44x/oICTljYqYX0cQJxdgM4bzsMUyQC4cLVsO lamQ== X-Gm-Message-State: AOAM533EFepAmGftY3MHQqRAxaZYl7SX0dUjt30r8KqyIvtIzYocmYsv Ud0q2IY57uPnB9JReSWZPj663ySCf7ApZA== X-Google-Smtp-Source: ABdhPJwpxRFub5b8HlVqiOjblfaj9uN3RkGkDFGTZXUQGaZ2oVobGBcyA1W7khFEK7Uw/Y0AcsXVcQ== X-Received: by 2002:a63:db03:: with SMTP id e3mr13723174pgg.225.1612721934376; Sun, 07 Feb 2021 10:18:54 -0800 (PST) Received: from localhost.localdomain ([2409:4050:2e07:af0b:4438:7fbe:1d1f:8bc]) by smtp.googlemail.com with ESMTPSA id n7sm16375194pfn.141.2021.02.07.10.18.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Feb 2021 10:18:53 -0800 (PST) From: Charvi Mendiratta To: git@vger.kernel.org Cc: sunshine@sunshineco.com, christian.couder@gmail.com, phillip.wood123@gmail.com, Charvi Mendiratta , Christian Couder , Phillip Wood Subject: [PATCH 1/7] sequencer: fixup the datatype of the 'flag' argument Date: Sun, 7 Feb 2021 23:44:34 +0530 Message-Id: <20210207181439.1178-2-charvi077@gmail.com> X-Mailer: git-send-email 2.29.0.rc1 In-Reply-To: <20210207181439.1178-1-charvi077@gmail.com> References: <20210207181439.1178-1-charvi077@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org As 'flag' is a combination of bits, so change its datatype from 'enum todo_item_flags' to 'unsigned'. Mentored-by: Christian Couder Mentored-by: Phillip Wood Helped-by: Eric Sunshine Signed-off-by: Charvi Mendiratta --- sequencer.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sequencer.c b/sequencer.c index d09ce446b6..f3928cf45c 100644 --- a/sequencer.c +++ b/sequencer.c @@ -1744,8 +1744,7 @@ static const char skip_first_commit_msg_str[] = N_("The 1st commit message will static const char skip_nth_commit_msg_fmt[] = N_("The commit message #%d will be skipped:"); static const char combined_commit_msg_fmt[] = N_("This is a combination of %d commits."); -static int check_fixup_flag(enum todo_command command, - enum todo_item_flags flag) +static int check_fixup_flag(enum todo_command command, unsigned flag) { return command == TODO_FIXUP && ((flag & TODO_REPLACE_FIXUP_MSG) || (flag & TODO_EDIT_FIXUP_MSG)); @@ -1850,7 +1849,7 @@ static void update_squash_message_for_fixup(struct strbuf *msg) static int append_squash_message(struct strbuf *buf, const char *body, enum todo_command command, struct replay_opts *opts, - enum todo_item_flags flag) + unsigned flag) { const char *fixup_msg; size_t commented_len = 0, fixup_off; @@ -1906,7 +1905,7 @@ static int update_squash_messages(struct repository *r, enum todo_command command, struct commit *commit, struct replay_opts *opts, - enum todo_item_flags flag) + unsigned flag) { struct strbuf buf = STRBUF_INIT; int res = 0; From patchwork Sun Feb 7 18:14:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charvi Mendiratta X-Patchwork-Id: 12073273 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E747C433DB for ; Sun, 7 Feb 2021 18:19:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0816D64E31 for ; Sun, 7 Feb 2021 18:19:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229618AbhBGSTn (ORCPT ); Sun, 7 Feb 2021 13:19:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229491AbhBGSTl (ORCPT ); Sun, 7 Feb 2021 13:19:41 -0500 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A86F8C061786 for ; Sun, 7 Feb 2021 10:19:01 -0800 (PST) Received: by mail-pj1-x1033.google.com with SMTP id gb24so509145pjb.4 for ; Sun, 07 Feb 2021 10:19:01 -0800 (PST) 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 :mime-version:content-transfer-encoding; bh=lC4QR429u0+7ZPSy8kdmBfdRM5ddttlVJKfi+xAtjSA=; b=AXUW+A8UpZcVTiDWi3uyJCKK4R0xckU3O2lIOtkrbovAf6IFahP73xdX6AQ86UKqIz DtskiabNbci7dHB0JpUbYQu0p3ezNdaFwJqOMZ6mn8funvKEn65f5KSQh1GCZRSy6WTs +SMCw9PcLrIL7JgIqe9fn8d3gSLTCyBrLv6k7+2F+RW3icklRw4rwJMn/XgVjKM7grGe Mic+OUUjcUoD+8IBQWHKNIrhu1juBLRZJzDwTA9e0P3RG5/gksXn7JeO1hj0bunH3kAU bvsGxY+X9wu1bFs2/lW4+DOu8I1m2QzQYgXvGjHioIQ+FZ8BvxBommIjoHx4AoQweri7 F4GQ== 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:mime-version:content-transfer-encoding; bh=lC4QR429u0+7ZPSy8kdmBfdRM5ddttlVJKfi+xAtjSA=; b=OSJNQPYGj6RGXGPbE5ZQFTNaCD8tSfywsCFYOv0FuXpbLDIRqEvCECgmYMtRSHO9vx t/HQJKLel43Zk16nHG6iXUN0Dx4zpQWnqfTp59vQlJ+Rxb5J92mK5eUp38vR5scpaM23 GbyrWI5Dnp5N8jOpmYl69OSS12Kbd5sWhXkJsA7vK8U/n3FZLElpTde+lf47AcGpU6bs 5uYISCzqR2OtRpuQCwKbPgtOAUN7Op9XykLN5rmSSa0KyrLti6phMIzo3d6mJWMNRyl0 OWOTU27su1opt9THO75POPcKCPrJeOckuGOAP5vkWJ/TCzdryJxE5py9koFVKXofmkIG if+g== X-Gm-Message-State: AOAM532mKg/MiuSJeHoXkNeZQj5LWWZe1KgAc9BeRviBVL3dvn4a4sWS G9ADDHD3dPiK0e5KOl9UDoMDAvKkVw7dBg== X-Google-Smtp-Source: ABdhPJzDeyIYXhrIHW8ATqApokLjAZWVd1ZtzjE/xYPByDPoXq0oDZSLvgoG3t6CrfvjnqShVUxB4g== X-Received: by 2002:a17:902:a60b:b029:df:ec2e:6a1d with SMTP id u11-20020a170902a60bb02900dfec2e6a1dmr13187752plq.27.1612721940942; Sun, 07 Feb 2021 10:19:00 -0800 (PST) Received: from localhost.localdomain ([2409:4050:2e07:af0b:4438:7fbe:1d1f:8bc]) by smtp.googlemail.com with ESMTPSA id n7sm16375194pfn.141.2021.02.07.10.18.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Feb 2021 10:19:00 -0800 (PST) From: Charvi Mendiratta To: git@vger.kernel.org Cc: sunshine@sunshineco.com, christian.couder@gmail.com, phillip.wood123@gmail.com, Charvi Mendiratta , Christian Couder , Phillip Wood Subject: [PATCH 2/7] sequencer: rename a few functions Date: Sun, 7 Feb 2021 23:44:35 +0530 Message-Id: <20210207181439.1178-3-charvi077@gmail.com> X-Mailer: git-send-email 2.29.0.rc1 In-Reply-To: <20210207181439.1178-1-charvi077@gmail.com> References: <20210207181439.1178-1-charvi077@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Rename functions to make them more descriptive and while at it, remove unnecessary 'inline' of the skip_fixupish() function. Mentored-by: Christian Couder Mentored-by: Phillip Wood Helped-by: Eric Sunshine Signed-off-by: Charvi Mendiratta --- sequencer.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sequencer.c b/sequencer.c index f3928cf45c..abc6d5cdfd 100644 --- a/sequencer.c +++ b/sequencer.c @@ -1744,7 +1744,7 @@ static const char skip_first_commit_msg_str[] = N_("The 1st commit message will static const char skip_nth_commit_msg_fmt[] = N_("The commit message #%d will be skipped:"); static const char combined_commit_msg_fmt[] = N_("This is a combination of %d commits."); -static int check_fixup_flag(enum todo_command command, unsigned flag) +static int is_fixup_flag(enum todo_command command, unsigned flag) { return command == TODO_FIXUP && ((flag & TODO_REPLACE_FIXUP_MSG) || (flag & TODO_EDIT_FIXUP_MSG)); @@ -1873,7 +1873,7 @@ static int append_squash_message(struct strbuf *buf, const char *body, strbuf_addstr(buf, body + commented_len); /* fixup -C after squash behaves like squash */ - if (check_fixup_flag(command, flag) && !seen_squash(opts)) { + if (is_fixup_flag(command, flag) && !seen_squash(opts)) { /* * We're replacing the commit message so we need to * append the Signed-off-by: trailer if the user @@ -1928,7 +1928,7 @@ static int update_squash_messages(struct repository *r, opts->current_fixup_count + 2); strbuf_splice(&buf, 0, eol - buf.buf, header.buf, header.len); strbuf_release(&header); - if (check_fixup_flag(command, flag) && !seen_squash(opts)) + if (is_fixup_flag(command, flag) && !seen_squash(opts)) update_squash_message_for_fixup(&buf); } else { struct object_id head; @@ -1951,11 +1951,11 @@ static int update_squash_messages(struct repository *r, strbuf_addf(&buf, "%c ", comment_line_char); strbuf_addf(&buf, _(combined_commit_msg_fmt), 2); strbuf_addf(&buf, "\n%c ", comment_line_char); - strbuf_addstr(&buf, check_fixup_flag(command, flag) ? + strbuf_addstr(&buf, is_fixup_flag(command, flag) ? _(skip_first_commit_msg_str) : _(first_commit_msg_str)); strbuf_addstr(&buf, "\n\n"); - if (check_fixup_flag(command, flag)) + if (is_fixup_flag(command, flag)) strbuf_add_commented_lines(&buf, body, strlen(body)); else strbuf_addstr(&buf, body); @@ -1968,7 +1968,7 @@ static int update_squash_messages(struct repository *r, oid_to_hex(&commit->object.oid)); find_commit_subject(message, &body); - if (command == TODO_SQUASH || check_fixup_flag(command, flag)) { + if (command == TODO_SQUASH || is_fixup_flag(command, flag)) { res = append_squash_message(&buf, body, command, opts, flag); } else if (command == TODO_FIXUP) { strbuf_addf(&buf, "\n%c ", comment_line_char); @@ -5661,7 +5661,7 @@ static int subject2item_cmp(const void *fndata, define_commit_slab(commit_todo_item, struct todo_item *); -static inline int skip_fixup_amend_squash(const char *subject, const char **p) { +static int skip_fixupish(const char *subject, const char **p) { return skip_prefix(subject, "fixup! ", p) || skip_prefix(subject, "amend! ", p) || skip_prefix(subject, "squash! ", p); @@ -5725,13 +5725,13 @@ int todo_list_rearrange_squash(struct todo_list *todo_list) format_subject(&buf, subject, " "); subject = subjects[i] = strbuf_detach(&buf, &subject_len); unuse_commit_buffer(item->commit, commit_buffer); - if (skip_fixup_amend_squash(subject, &p)) { + if (skip_fixupish(subject, &p)) { struct commit *commit2; for (;;) { while (isspace(*p)) p++; - if (!skip_fixup_amend_squash(p, &p)) + if (!skip_fixupish(p, &p)) break; } From patchwork Sun Feb 7 18:14:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charvi Mendiratta X-Patchwork-Id: 12073275 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 968DBC433E0 for ; Sun, 7 Feb 2021 18:19:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6784964E31 for ; Sun, 7 Feb 2021 18:19:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229621AbhBGSTw (ORCPT ); Sun, 7 Feb 2021 13:19:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229491AbhBGSTr (ORCPT ); Sun, 7 Feb 2021 13:19:47 -0500 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D8EAC061788 for ; Sun, 7 Feb 2021 10:19:07 -0800 (PST) Received: by mail-pf1-x42e.google.com with SMTP id q20so8260725pfu.8 for ; Sun, 07 Feb 2021 10:19:07 -0800 (PST) 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 :mime-version:content-transfer-encoding; bh=ZB4Ln2OLvjtq6Jp681f+oNIDyxCPIeKrnZ+6qU7VShE=; b=IsLgqDtdgDHg0R8lbpoA5IDDnkofD2inthnohTgOBY9IQousmoogY6/y+Qi8UvOEGC 8AOfqqxXtO/9IDtu/TRL6ss0ZXC2fcCxeWKHw5lpYbBFUZ8N3FZzZhxdENdvwBHLRaMq O5/Hf1xNXAn1FpmSGlcFs3Lt94AFinh6OIOd2t8U7BGP+QR4EHhhYcL5FzUN+MQfFE8W 3WJjwICNmzwhWI4BhmRNY/0iGbrmmsQ8aqgcT7V6jCx3PxEkx9qfMaGQdQxCd/ON89lM 4ElWAOmYfnHjSznXJObkFvcltxzi8Xb4RPhRINrKOqBJkShTZAV9WPKWTy9Sx9t9RmnX 6P4w== 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:mime-version:content-transfer-encoding; bh=ZB4Ln2OLvjtq6Jp681f+oNIDyxCPIeKrnZ+6qU7VShE=; b=IjuMY8EvXO++hW6A8sEuOJ6yrlZRPFDoH8Te93FqfIvP2TUE7MxI0VpUv+ywYeZ9Hm PWu9feH739sWheZgwAVAMldx3iFLYQLfhNARqDUQiO500hHnCtl4ap+k0iyUGQueFJnq QJw32N0dysvqqbD1Hi0h8F62Tr6Ivf4QpdnT8vt37zN5OOj2yDF5eiV1+uAKAoYv3pEX nQwqXkxDaCK0355A/4uiYcuF1fMFq32eJK+axL0KRxW8CvLdKta4sEfSS6YZ3ujjf5SA eNljwJMQkpAOZHZVWXnhinNXTsdnWmJM2QbDUjeid9zU+6dpJ5mOlE1HmomXCroHYwbH IlxA== X-Gm-Message-State: AOAM531wshSJX/EJ0uLYmH0lE3lvjMUB8F42Mtrn3y/L0tYiux8huk2D vYZ3DhgJxvLZ0cdjXiykVGgDXWwjdMTTGw== X-Google-Smtp-Source: ABdhPJwF/NOv3LmTNv+mLaSXsJr0jOqwI4fASb5+KKqcAJPQrDEfwpof3y0Ri+x1TbUdK7b/JXnHsg== X-Received: by 2002:a62:8c05:0:b029:1d8:7f36:bcd8 with SMTP id m5-20020a628c050000b02901d87f36bcd8mr11470966pfd.43.1612721946689; Sun, 07 Feb 2021 10:19:06 -0800 (PST) Received: from localhost.localdomain ([2409:4050:2e07:af0b:4438:7fbe:1d1f:8bc]) by smtp.googlemail.com with ESMTPSA id n7sm16375194pfn.141.2021.02.07.10.19.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Feb 2021 10:19:06 -0800 (PST) From: Charvi Mendiratta To: git@vger.kernel.org Cc: sunshine@sunshineco.com, christian.couder@gmail.com, phillip.wood123@gmail.com, Charvi Mendiratta , Christian Couder , Phillip Wood Subject: [PATCH 3/7] rebase -i: clarify and fix 'fixup -c' rebase-todo help Date: Sun, 7 Feb 2021 23:44:36 +0530 Message-Id: <20210207181439.1178-4-charvi077@gmail.com> X-Mailer: git-send-email 2.29.0.rc1 In-Reply-To: <20210207181439.1178-1-charvi077@gmail.com> References: <20210207181439.1178-1-charvi077@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org When `-c` says "edit the commit message" it's not clear what will be edited. The original's commit message or the replacement's message or a combination of the two. Word it such that it states more precisely what exactly will be edited and also remove the use of a period and capitalized word in the to-do help text. Mentored-by: Christian Couder Mentored-by: Phillip Wood Helped-by: Eric Sunshine Signed-off-by: Charvi Mendiratta --- rebase-interactive.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rebase-interactive.c b/rebase-interactive.c index c3bd02adee..e85994beb6 100644 --- a/rebase-interactive.c +++ b/rebase-interactive.c @@ -45,8 +45,8 @@ void append_todo_help(int command_count, "e, edit = use commit, but stop for amending\n" "s, squash = use commit, but meld into previous commit\n" "f, fixup [-C | -c] = like \"squash\", but discard this\n" -" commit's log message. Use -C to replace with this\n" -" commit message or -c to edit the commit message\n" +" commit's log message; use -C to replace with this\n" +" commit message or -c to edit this commit message\n" "x, exec = run command (the rest of the line) using shell\n" "b, break = stop here (continue rebase later with 'git rebase --continue')\n" "d, drop = remove commit\n" @@ -55,7 +55,7 @@ void append_todo_help(int command_count, "m, merge [-C | -c ]