From patchwork Wed Jan 23 05:06:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 10776529 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 86BF5139A for ; Wed, 23 Jan 2019 05:06:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 701E529F66 for ; Wed, 23 Jan 2019 05:06:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 648452A517; Wed, 23 Jan 2019 05:06:23 +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 0D7D529F66 for ; Wed, 23 Jan 2019 05:06:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726000AbfAWFGU (ORCPT ); Wed, 23 Jan 2019 00:06:20 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:46052 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725899AbfAWFGT (ORCPT ); Wed, 23 Jan 2019 00:06:19 -0500 Received: by mail-pg1-f193.google.com with SMTP id y4so480878pgc.12 for ; Tue, 22 Jan 2019 21:06:19 -0800 (PST) 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=rYi1sBI6bUszRxeUIq5B+1t0ndRMBCFpOLMoAg80C/U=; b=YqR8WMG/Oet0OT2HC5mx2h7TadIcH3cnysW6o7oafByKvNYCjH7VfTFhlaPCV6N39y lKcn9HYUGTUsGaJVQmzpMUsJRcNPCJGFLJe2obtag3dEzYDEQkw7+EO/Xy1wE31uUnnt 9/dFWQj7xwcVSDBm7FnpJCW0JdhebjmwqXG8rjXl2AJlUVlHml+rHrAPFpn06byy3Wyd oQB6bNf6STV+5nsFyIv7il7LSXhePmhu2921W5O8RkOO0EJTZ+lwgz3Ei1iqpC0Cmb2L j/xeRAdX+rTNJOVNF3cdvzq0csh2CWdbh5kUM8TO2IzmGFwsQcMJPIfStDeToiSwr8hr JdJA== 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=rYi1sBI6bUszRxeUIq5B+1t0ndRMBCFpOLMoAg80C/U=; b=nzM0eOKnsuVp+HHNdUiQShmIt75v591Cqgu8Rt8stNVcCX2rXEYDNZSWxbSOKcPHRS j0XEOtjK+chenio/5PU5c/qpJotcLd/IVS9zfBvRDnFmqP3PvE93JEou42AypjBueQrw nCG65ww+zck0FiH0zYF3DNfVemAk1DpgmDbdQkXq899vaZqjqTvyBwLIflhYJKYMpqU+ U/Lez7Apv5LcTMMul7FDE0PFduhQtUc0nqDz7KuMm9D4grbVvKxqyNH5gBW/RoE0A8M3 klCo8HYZj412ALgZLsAZHPBU5C6wfvAUMjU5wx0rhhcy+3v/S1x5AfDYXQZgAbbI8lhA ZJ9Q== X-Gm-Message-State: AJcUukdunKeTwpW3i7wCMF75rPGnBeh9eUJ2tq2mQlMtNVKwwpATCnKm DpFaf2jeKR3bicqHAiFONGtUgWE/ X-Google-Smtp-Source: ALg8bN6brmTzhrKPcbZ9Ees4oF69lzXLe29LOQhj74bow+1MfZjf0bkHAjHbMToKOEFRuRxdy8cTLQ== X-Received: by 2002:a63:2ac9:: with SMTP id q192mr768006pgq.58.1548219978430; Tue, 22 Jan 2019 21:06:18 -0800 (PST) Received: from archbookpro.localdomain (c-73-222-73-77.hsd1.ca.comcast.net. [73.222.73.77]) by smtp.gmail.com with ESMTPSA id x186sm21726433pfb.59.2019.01.22.21.06.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Jan 2019 21:06:17 -0800 (PST) Date: Tue, 22 Jan 2019 21:06:15 -0800 From: Denton Liu To: git@vger.kernel.org Cc: gitster@pobox.com Subject: [PATCH v6 0/4] Add git-merge --cleanup support Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.2 (2019-01-07) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There were some merge conflicts since v5 so I've rebased the last few patches on the latest master and fixed the conflicts. Not related to this but while I was making my changes, I noticed that -F and -m don't die properly in git-merge when they accept invalid arguments. Instead, they just print an error message to stderr and the program keeps running. Is this the expected behaviour? Changes since V1: * Only check MERGE_MSG for a scissors line instead of all prepended files * Make a variable static in merge where appropriate * Add passthrough options in pull * Add documentation for the new option * Add tests to ensure desired behaviour Changes since V2: * Merge both patches into one patch * Fix bug in help message printing logic Changes since V3: * Add patch to cleanup 'merge --squash c3 with c7' test in t7600 * Use test_i18ncmp instead of test_cmp to pass GETTEXT_POISON tests Changes since V4: * Add patches so that git-merge messages will be cleaned up like in git-commit Changes since V5: * Rebase on latest master and resolve merge conflicts Denton Liu (4): commit: extract cleanup_mode functions to sequencer t7600: clean up 'merge --squash c3 with c7' test merge: cleanup messages like commit merge: add scissors line on merge conflict Documentation/merge-options.txt | 7 ++++ builtin/commit.c | 41 +++++++++------------- builtin/merge.c | 45 ++++++++++++++++++++---- builtin/pull.c | 6 ++++ sequencer.c | 29 ++++++++++++++++ sequencer.h | 4 +++ t/t7600-merge.sh | 53 +++++++++++++++++++++++++--- t/t7604-merge-custom-message.sh | 61 +++++++++++++++++++++++++++++++++ wt-status.c | 12 +++++-- wt-status.h | 1 + 10 files changed, 221 insertions(+), 38 deletions(-)