From patchwork Mon Jun 15 11:53:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 11604597 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 1EFCB14E3 for ; Mon, 15 Jun 2020 11:53:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 06CEA20739 for ; Mon, 15 Jun 2020 11:53:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="is1mpXUL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729717AbgFOLxb (ORCPT ); Mon, 15 Jun 2020 07:53:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728285AbgFOLxa (ORCPT ); Mon, 15 Jun 2020 07:53:30 -0400 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A68BC061A0E for ; Mon, 15 Jun 2020 04:53:30 -0700 (PDT) Received: by mail-qk1-x741.google.com with SMTP id 205so15376509qkg.3 for ; Mon, 15 Jun 2020 04:53:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=7erxqw+fYt82xG3y8+1MwtEWJ2sFUA4eanFtKu+CSx4=; b=is1mpXULwOQm66S+jBZAAmDBGNkyHWIq+oVVWDp1gbyCAN83tB6qBiVJ64Ad39/5cX AgIXkejULDFXmSNoDmKMGCfHN0ujU3vQODjP7wtAkFPDvsJ2S9tKdf+bUwUQNn+YAYMk EZRnSHT2L2F1faDjf1Ps+RocC8uoBihva/cI7K+3FmxhYdFmng3F5NLzzqLwxzTiLhxg dXGoLj0GQtHGaMG4jtfIi3fJJmRv8vI024GNkh7GydZR6OgFh1iVdZrqFISO4wwqV0/X /fYro0h6o2I9/kCP4VlQollkviziCXDIXzMd4rEpuTmfDPeCI1O2Sjj+yKJf77q7V/Uq OHsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7erxqw+fYt82xG3y8+1MwtEWJ2sFUA4eanFtKu+CSx4=; b=kb+RAniLXV8F/L2wrB3W2DCq+b/Kz+pWoQE1MwL3CwMvEnqpELcKKJesUhYyXRxCYC 5Ly3lVBy4nFm+7Xp7VyfCCI96Wy/UAMe0Yk9SNKXoDxQLOVDG3agnxvX8AlUMFkxqWeY PPwT4T2ZEWy8sF27tCegtOlm6vuZD2Ipzp5e06u64hhjNBJwt05Bi7C603c5sjFY1yDV HF7NzdEhxFan1dyquD27PWPpL0W0O9oCdIm3xMJhKXjaGX1Uy2zrgiAvpTRcWCdg7CG5 JAtIj+dPM8U1tjhtMBoJMrIZfi6DR5ecGlVe/94k3VxkysNbZ2Hc0IpuNYaWdhFEneEg aQeg== X-Gm-Message-State: AOAM531G0wXmwG4262uGvIb4XXzSCy9hl2oAVAgygdPd97+XjyaSnE/G W0e86I+nvOLQsaD75ImAmi3MAK6etSU= X-Google-Smtp-Source: ABdhPJw/eYNvths8apVLdS6TvbVppJ3tR+dFsI50WIWj4cdEXnuR1ylVAPKx17WkGVcf17f9CdjYSA== X-Received: by 2002:a37:b547:: with SMTP id e68mr14465229qkf.127.1592222008854; Mon, 15 Jun 2020 04:53:28 -0700 (PDT) Received: from archbookpro.localdomain (CPE18593399858a-CM185933998587.cpe.net.cable.rogers.com. [174.112.65.113]) by smtp.gmail.com with ESMTPSA id f43sm12543781qte.58.2020.06.15.04.53.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 04:53:28 -0700 (PDT) From: Denton Liu To: Git Mailing List Subject: [PATCH 1/3] t3200: rename "expected" to "expect" Date: Mon, 15 Jun 2020 07:53:18 -0400 Message-Id: <5fa405d7e1672ef18442cdcd514698c92e139a8e.1592221875.git.liu.denton@gmail.com> X-Mailer: git-send-email 2.27.0.132.g321788e831 In-Reply-To: References: MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Clean up style of test by changing some filenames from "expected" to "expect", which follows typical test convention. Also, change a space-indent into a tab-indent. Signed-off-by: Denton Liu --- t/t3200-branch.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index 411a70b0ce..da3659c3d3 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -323,11 +323,11 @@ test_expect_success 'git branch --list -v with --abbrev' ' test_expect_success 'git branch --column' ' COLUMNS=81 git branch --column=column >actual && - cat >expected <<\EOF && + cat >expect <<\EOF && a/b/c bam foo l * master mb o/o q abc bar j/k m/m master2 n o/p r EOF - test_cmp expected actual + test_cmp expect actual ' test_expect_success 'git branch --column with an extremely long branch name' ' @@ -336,7 +336,7 @@ test_expect_success 'git branch --column with an extremely long branch name' ' test_when_finished "git branch -d $long" && git branch $long && COLUMNS=80 git branch --column=column >actual && - cat >expected <expect <actual && git config --unset column.branch && git config --unset column.ui && - cat >expected <<\EOF && + cat >expect <<\EOF && a/b/c bam foo l * master mb o/o q abc bar j/k m/m master2 n o/p r EOF - test_cmp expected actual + test_cmp expect actual ' test_expect_success 'git branch --column -v should fail' ' @@ -379,7 +379,7 @@ test_expect_success 'git branch -v with column.ui ignored' ' git config column.ui column && COLUMNS=80 git branch -v | cut -c -10 | sed "s/ *$//" >actual && git config --unset column.ui && - cat >expected <<\EOF && + cat >expect <<\EOF && a/b/c abc bam @@ -397,7 +397,7 @@ test_expect_success 'git branch -v with column.ui ignored' ' q r EOF - test_cmp expected actual + test_cmp expect actual ' mv .git/config .git/config-saved @@ -922,17 +922,17 @@ test_expect_success 'test --unset-upstream on a particular branch' ' ' test_expect_success 'disabled option --set-upstream fails' ' - test_must_fail git branch --set-upstream origin/master + test_must_fail git branch --set-upstream origin/master ' test_expect_success '--set-upstream-to notices an error to set branch as own upstream' ' git branch --set-upstream-to refs/heads/my13 my13 2>actual && - cat >expected <<-\EOF && + cat >expect <<-\EOF && warning: Not setting branch my13 as its own upstream. EOF test_expect_code 1 git config branch.my13.remote && test_expect_code 1 git config branch.my13.merge && - test_i18ncmp expected actual + test_i18ncmp expect actual ' # Keep this test last, as it changes the current branch From patchwork Mon Jun 15 11:53:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 11604599 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 EFA791392 for ; Mon, 15 Jun 2020 11:53:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D7C5F20739 for ; Mon, 15 Jun 2020 11:53:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qVeJExgA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729741AbgFOLxc (ORCPT ); Mon, 15 Jun 2020 07:53:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729686AbgFOLxb (ORCPT ); Mon, 15 Jun 2020 07:53:31 -0400 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4D5FC061A0E for ; Mon, 15 Jun 2020 04:53:30 -0700 (PDT) Received: by mail-qk1-x742.google.com with SMTP id c14so15316821qka.11 for ; Mon, 15 Jun 2020 04:53:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=lajCn4uG6rl5Mi+5kVFHuwGJDx55TbGLCDnZMzYgDBw=; b=qVeJExgAuM5MMm508h6mMYSmk8uczrwcEQftRzLMpwgj3i4nV4Z6bjtXLzJW3GeH9F 1Pj58SHb5AcAhMJj3zyzigA32coAJfmdpGq39oFaP97ndupLxFODYChiihCaCm6mcBgr 9G4j10s1FJtjiVrqqPeHRq0uxxxDpPzxriIjpKLYQ6AVB+q8+zHGu7id7bcF8S9WGVQO xDXQH7mFdlyOZISZjSU/6Wd8B7Fr2mXfrBpHoPxaY04YS5327X1IT6yK+fSyYVWoz354 z0SOXxPPLGLdfxw2c42RAFwuHlsq9a7ySi89cBqLiFX3vdSE+QrQlIQoGqWIXzLRy+1J Gi8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lajCn4uG6rl5Mi+5kVFHuwGJDx55TbGLCDnZMzYgDBw=; b=LX2/lmd12qLK7K864LDcXrdiYa6tLFPVWqaEgE45rcGrgWOhYNqu751Nlslhi/Ie92 xvoOYhgwuQdfikhXt11AzOrVGPsvT6lW8lIIsnZpEwHWBOaudWP0P85aEWr0g1OkEfaA BGBfm41NeZGAoZHAvGv0rUXzkJaqK6OhNCaib/auM2dMsbpXnryJGfEBBQSyl6P7248u e+gJmM3e+zlI0xm7q4ZISjfp23am9XSZe0/BN1UFbPJlocJW3auWx0BitLjPpre8cN/e j3gCNd/UnGzmv6jFiy9q4MrLBRnW6kqymzFPajyA5Rrjuh5pReyP3mgcGA7F9pZNA5/P FsJA== X-Gm-Message-State: AOAM531Nnws0vcuMe0SDdfuPjwplKavQywgB5lUwpXJAD9kkjN58aZFW 6hme0pEf4ua9DCgz11nDya53V5+aaZw= X-Google-Smtp-Source: ABdhPJxFWSUE/KlToc5H8x4gFemh6MP7Jiw0Eb1lwSWWU89fnK0BQUZqomfaljGlB1gQ5ker8FNnZA== X-Received: by 2002:a37:486:: with SMTP id 128mr14105484qke.489.1592222009740; Mon, 15 Jun 2020 04:53:29 -0700 (PDT) Received: from archbookpro.localdomain (CPE18593399858a-CM185933998587.cpe.net.cable.rogers.com. [174.112.65.113]) by smtp.gmail.com with ESMTPSA id f43sm12543781qte.58.2020.06.15.04.53.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 04:53:29 -0700 (PDT) From: Denton Liu To: Git Mailing List Subject: [PATCH 2/3] t3200: test for specific errors Date: Mon, 15 Jun 2020 07:53:19 -0400 Message-Id: X-Mailer: git-send-email 2.27.0.132.g321788e831 In-Reply-To: References: MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org In the "--set-upstream-to" and "--unset-upstream" tests, specific error conditions are being tested. However, there is no way of ensuring that a test case is failing because of some specific error. Check stderr of failing commands to ensure that they are failing in the expected way. Signed-off-by: Denton Liu --- t/t3200-branch.sh | 45 ++++++++++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index da3659c3d3..1fd03cae80 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -835,32 +835,42 @@ test_expect_success 'branch from tag w/--track causes failure' ' ' test_expect_success '--set-upstream-to fails on multiple branches' ' - test_must_fail git branch --set-upstream-to master a b c + echo "fatal: too many arguments to set new upstream" >expect && + test_must_fail git branch --set-upstream-to master a b c 2>err && + test_i18ncmp expect err ' test_expect_success '--set-upstream-to fails on detached HEAD' ' git checkout HEAD^{} && - test_must_fail git branch --set-upstream-to master && - git checkout - + test_when_finished git checkout - && + echo "fatal: could not set upstream of HEAD to master when it does not point to any branch." >expect && + test_must_fail git branch --set-upstream-to master 2>err && + test_i18ncmp expect err ' test_expect_success '--set-upstream-to fails on a missing dst branch' ' - test_must_fail git branch --set-upstream-to master does-not-exist + echo "fatal: branch '"'"'does-not-exist'"'"' does not exist" >expect && + test_must_fail git branch --set-upstream-to master does-not-exist 2>err && + test_i18ncmp expect err ' test_expect_success '--set-upstream-to fails on a missing src branch' ' - test_must_fail git branch --set-upstream-to does-not-exist master + test_must_fail git branch --set-upstream-to does-not-exist master 2>err && + test_i18ngrep "the requested upstream branch '"'"'does-not-exist'"'"' does not exist" err ' test_expect_success '--set-upstream-to fails on a non-ref' ' - test_must_fail git branch --set-upstream-to HEAD^{} + echo "fatal: Cannot setup tracking information; starting point '"'"'HEAD^{}'"'"' is not a branch." >expect && + test_must_fail git branch --set-upstream-to HEAD^{} 2>err && + test_i18ncmp expect err ' test_expect_success '--set-upstream-to fails on locked config' ' test_when_finished "rm -f .git/config.lock" && >.git/config.lock && git branch locked && - test_must_fail git branch --set-upstream-to locked + test_must_fail git branch --set-upstream-to locked 2>err && + test_i18ngrep "could not lock config file .git/config: File exists" err ' test_expect_success 'use --set-upstream-to modify HEAD' ' @@ -881,14 +891,17 @@ test_expect_success 'use --set-upstream-to modify a particular branch' ' ' test_expect_success '--unset-upstream should fail if given a non-existent branch' ' - test_must_fail git branch --unset-upstream i-dont-exist + echo "fatal: Branch '"'"'i-dont-exist'"'"' has no upstream information" >expect && + test_must_fail git branch --unset-upstream i-dont-exist 2>err && + test_i18ncmp expect err ' test_expect_success '--unset-upstream should fail if config is locked' ' test_when_finished "rm -f .git/config.lock" && git branch --set-upstream-to locked && >.git/config.lock && - test_must_fail git branch --unset-upstream + test_must_fail git branch --unset-upstream 2>err && + test_i18ngrep "could not lock config file .git/config: File exists" err ' test_expect_success 'test --unset-upstream on HEAD' ' @@ -900,17 +913,23 @@ test_expect_success 'test --unset-upstream on HEAD' ' test_must_fail git config branch.master.remote && test_must_fail git config branch.master.merge && # fail for a branch without upstream set - test_must_fail git branch --unset-upstream + echo "fatal: Branch '"'"'master'"'"' has no upstream information" >expect && + test_must_fail git branch --unset-upstream 2>err && + test_i18ncmp expect err ' test_expect_success '--unset-upstream should fail on multiple branches' ' - test_must_fail git branch --unset-upstream a b c + echo "fatal: too many arguments to unset upstream" >expect && + test_must_fail git branch --unset-upstream a b c 2>err && + test_i18ncmp expect err ' test_expect_success '--unset-upstream should fail on detached HEAD' ' git checkout HEAD^{} && - test_must_fail git branch --unset-upstream && - git checkout - + test_when_finished git checkout - && + echo "fatal: could not unset upstream of HEAD when it does not point to any branch." >expect && + test_must_fail git branch --unset-upstream 2>err && + test_i18ncmp expect err ' test_expect_success 'test --unset-upstream on a particular branch' ' From patchwork Mon Jun 15 11:53:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 11604601 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 D3F261392 for ; Mon, 15 Jun 2020 11:53:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BD03920739 for ; Mon, 15 Jun 2020 11:53:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qMOadPlM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729758AbgFOLxd (ORCPT ); Mon, 15 Jun 2020 07:53:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729732AbgFOLxc (ORCPT ); Mon, 15 Jun 2020 07:53:32 -0400 Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAD7BC061A0E for ; Mon, 15 Jun 2020 04:53:31 -0700 (PDT) Received: by mail-qt1-x82d.google.com with SMTP id g18so12255221qtu.13 for ; Mon, 15 Jun 2020 04:53:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=jvEjT3LS5Xhx83JzZ7mwoZFRCzRRBgIZ95nhIq4PitI=; b=qMOadPlMop3O1PJ2F0nPkVAfhGQRYM08ErGMq8AdOoM05v2YKscws7m5+fimT4Przp Xv2erkNYYZH4M1oysV6Iuz6oh829J6bRGj2XMQTU9asTR6EJYxJrlz6nxJ716AIWep4d E/QaxJ9/WD76L9Jf/PJByFHWnHkSz7dqIytdxtXifOhd9hqy+B74V0+h5mhmGeKG7M0i yG3OHaRZ8dniQ37RPqcVly3T3iHDVEoN1PJd1zqQpNStflILoDN3CDhRpR1nQo4yvjFA d8oaAxfMxz9tq0t3X+Nz28siHncpSOkEvepr8KLH/iu/dEzRfiakhF82U+PzkMvC30oD +Jpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jvEjT3LS5Xhx83JzZ7mwoZFRCzRRBgIZ95nhIq4PitI=; b=cklXCsFRySIe18YHnMtVSpHqNZzWF5lEok62QBUKtGkeDPMCjEeSVhJLLSFK1GgLVC hcfUPKB/ERc1V4C4u4iFcJskXnTGGDcuP7TVp1Vi6F0jqNPyQG+oDDx/Ej8mrAyFcIfX vC+Ahxl7axGXMYxZIv/qvx1QW7o9MCxdzCx2oQhAvC7R9j4K9bEfk6d6w3VIaI1vtcLn vQmYGQUWVIyArSziGawQowKlKvC5vYfsUO5mrdL2eQE8pOuIDDxRIhJUOExKhARrbjjA EB3ZUVtPNDCPmDFhNK0osBV4tygH37s9MGjsMhtnMiSy5f9yk76IBTc40sONgUgEYXdr skzw== X-Gm-Message-State: AOAM532HM6WVyCgzuufhNMloPmPq+CwV/xSN9CLCs1JvIzevWj/+c2G9 +vBnSiY2MHpR+uBHwYBAIy17mMsYTMk= X-Google-Smtp-Source: ABdhPJzR2r+RLfMOCbUCzVqFmzXHYzuMuFTnRdHDv8TpQfeQSF8Er22e3AGmZcX9epK6QmzNqSXF2Q== X-Received: by 2002:ac8:4e2f:: with SMTP id d15mr15469906qtw.196.1592222010640; Mon, 15 Jun 2020 04:53:30 -0700 (PDT) Received: from archbookpro.localdomain (CPE18593399858a-CM185933998587.cpe.net.cable.rogers.com. [174.112.65.113]) by smtp.gmail.com with ESMTPSA id f43sm12543781qte.58.2020.06.15.04.53.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 04:53:30 -0700 (PDT) From: Denton Liu To: Git Mailing List Subject: [PATCH 3/3] branch: don't mix --edit-description Date: Mon, 15 Jun 2020 07:53:20 -0400 Message-Id: <1d0eebd1ecf24db0241801af31d904a19ad391a8.1592221875.git.liu.denton@gmail.com> X-Mailer: git-send-email 2.27.0.132.g321788e831 In-Reply-To: References: MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org `git branch` accepts `--edit-description` in conjunction with other arguments. However, `--edit-description` is its own mode, similar to `--set-upstream-to`, which is also made mutually exclusive with other modes. Prevent `--edit-description` from being mixed with other modes. Signed-off-by: Denton Liu --- builtin/branch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/branch.c b/builtin/branch.c index accb61b1aa..99633ad004 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -693,7 +693,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix) list = 1; if (!!delete + !!rename + !!copy + !!new_upstream + !!show_current + - list + unset_upstream > 1) + list + edit_description + unset_upstream > 1) usage_with_options(builtin_branch_usage, options); if (filter.abbrev == -1)