From patchwork Wed Aug 5 13:34:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philippe Blain via GitGitGadget X-Patchwork-Id: 11702445 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 D0D89722 for ; Wed, 5 Aug 2020 19:52:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B7AD322CA0 for ; Wed, 5 Aug 2020 19:52:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UkyXvsbG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729438AbgHETwk (ORCPT ); Wed, 5 Aug 2020 15:52:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726418AbgHEQut (ORCPT ); Wed, 5 Aug 2020 12:50:49 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA5C7C0A3BFD for ; Wed, 5 Aug 2020 06:34:43 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id a15so40714408wrh.10 for ; Wed, 05 Aug 2020 06:34:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:mime-version :content-transfer-encoding:fcc:to:cc; bh=8qo/UduqfGZZ69wrhv8No4m5HunNDTQ7JOhdXAVzgEM=; b=UkyXvsbGKo4zKwut2yEuhmDFpX3XARvmW1M6CtppjHpiXSVGT20bg0pNGLfbTCxk/p JOAr1tqxKvDdjliImuib7drJN7m6qm328R+vwsTxWFOufy/fMPfMvV2UadNUXDaA3QEY v0ejoVGbixyqVbgEv2X059+PqLOwdYsV5LAzjsgJYvGHuE7PfODansRRcZyITf6tgd8W ZcFDwQQZhtxfVek24Y++V3cfP3eL75OYgIah6x37Adb9/mc0tpXxdsxb2qtRWLmM91HF mVjgpnMo6Q+vY745pSYZimB9orMyx1z0IrpEIa7+ivLu6mGPz92Xn3B4GFdyxOH4riTy 9zDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:mime-version:content-transfer-encoding:fcc:to:cc; bh=8qo/UduqfGZZ69wrhv8No4m5HunNDTQ7JOhdXAVzgEM=; b=mCGCgJFCPUXQFxUbKeI/0UT0Jjh+UX8OnL67pNteXc1ip+moPvkD0vY+La8DR8VUce dLMzNWbhdfq9HgY3W5Pos9JOCNMBCilcuKGO5zZfmesbEnz1KOM6p5NpsxojliH4yHoc nHUTAUcVQDulvU6TMqNyNRTy0SIVAu8iWVVR5XufmIxrvpF8eDl4Tfq0JP5V7Pba33DA C3XCOICTv6E7l63NmuKk4m7/4k5lHxaR622p/Y5CWjFYHqdpIaGzbmbcMKjPDr/1j2Is 0/pbVeHqY6aWqiviHI8l0LcoOGK2Ae+XIIQheTjQSZR4CenjOhIhmiUWZLSv+k9zqrfC kuDw== X-Gm-Message-State: AOAM5328xpeonVDFHNYNO18KA2or2pDDSXQ/vbcqbZDwQH7S5yYbCNry XrWdU6CRCrgd34iS3FnDVDKcOYWA X-Google-Smtp-Source: ABdhPJxDd6j3Q6+FTCg1pyGGa8kd05Y6yxVuWUsbJTpS2wQ78K910q1ee0CIKA9qlCDTfErjg8zG1A== X-Received: by 2002:adf:df89:: with SMTP id z9mr2825133wrl.395.1596634466977; Wed, 05 Aug 2020 06:34:26 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id z7sm2778327wmk.6.2020.08.05.06.34.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Aug 2020 06:34:26 -0700 (PDT) Message-Id: In-Reply-To: References: From: " =?utf-8?q?Marco_Trevisan_=28Trevi=C3=B1o=29?= via GitGitGadget" Date: Wed, 05 Aug 2020 13:34:22 +0000 Subject: [PATCH 2/3] mergetool-lib: keep a list of cross desktop merge tools MIME-Version: 1.0 Fcc: Sent To: git@vger.kernel.org Cc: Marco Trevisan , =?utf-8?q?Marco_Trevisan_=28Trevi=C3=B1?= =?utf-8?q?o=29?= Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Instead of repeating the same tools multiple times, let's just keep them in another variable and list them depending the current desktop Signed-off-by: Marco Trevisan (TreviƱo) --- git-mergetool--lib.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh index be28fe375f..243cd2b06b 100644 --- a/git-mergetool--lib.sh +++ b/git-mergetool--lib.sh @@ -288,11 +288,12 @@ list_merge_tool_candidates () { fi if test -n "$DISPLAY" then + cross_desktop_tools="opendiff kdiff3 tkdiff xxdiff" if is_desktop "GNOME" then - tools="meld opendiff kdiff3 tkdiff xxdiff $tools" + tools="meld $cross_desktop_tools $tools" else - tools="opendiff kdiff3 tkdiff xxdiff meld $tools" + tools="$cross_desktop_tools meld $tools" fi tools="$tools gvimdiff diffuse diffmerge ecmerge" tools="$tools p4merge araxis bc codecompare"