From patchwork Mon Dec 24 08:47:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nickolai Belakovski X-Patchwork-Id: 10742079 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 557066C5 for ; Mon, 24 Dec 2018 08:48:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 46CD326E47 for ; Mon, 24 Dec 2018 08:48:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3B562283B2; Mon, 24 Dec 2018 08:48:15 +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 E94C626E47 for ; Mon, 24 Dec 2018 08:48:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726918AbeLXIsO (ORCPT ); Mon, 24 Dec 2018 03:48:14 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:41326 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726913AbeLXIsO (ORCPT ); Mon, 24 Dec 2018 03:48:14 -0500 Received: by mail-pg1-f193.google.com with SMTP id m1so5362872pgq.8 for ; Mon, 24 Dec 2018 00:48:13 -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; bh=XhC1SAWGvS243nhf21eDQu7vxRqmiTk0D1KP5SxjkmU=; b=E0KPzFx6CSWbe0l9PZbG2qIxc4MSl430MwTVOcs6E3lPFulD18AH1d8h8BtPP1WHz2 Cji0gGQvB7ijRVrjHoqwlwq1CMb1/pUavIyZzi9w0tnfR+qqFLZeVw3Uqbvm61n5fH2s Zm4nscWfsccvS3aam3cKPDLdfg5HRAsUgXles41+DEGEFR5/e07zTYy/LLG8z1NX/zMf K5cmIDU6QtWXy7K74f52AXrjvER6PDRIBJhMb7N6nO1ra7FtZnoYnIoUfW1jPvFzN3DA 0UcZtxLdbnDW3vHH8YRvqgk14e2fG2TZ31r5ua73BqJ3yWBnzfIkDvduPgSUuNLOrXie 7DIw== 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; bh=XhC1SAWGvS243nhf21eDQu7vxRqmiTk0D1KP5SxjkmU=; b=fHqplnTmVDQFCQb9UR+SgskOn3vvLifZRYcWlLRisrUzGxFSHmJuOUDWK7aqH9rXQ4 Yp4Z0Vbqh4QqnG9k7h81Xw1Uq4nu9k0vVvauNHA3YZZ+K08SjBJeM/gpm964Sr/6Wugp o1BgYFp2b81dhE7lSmmfVuaLOlWUGoiApasudTL8C+EqWEZ0MOAEPPgboaPXtlYyMbAv u+YHidyDGNP9ZeNu0Knw4C49GN2c/d5gxBIDqyDV49JX6RdT+1xoUiej04O7en3yeJyF ETAzgPSUXMCS1UHRp2kF2KTynrnT+nW9C5fMawppQkDhHuG5OVIIrCxzvSOslv1FMcy+ iRRg== X-Gm-Message-State: AJcUukcKXT65RZseQ/X+lCocMVzAN9C9Qy/zWSnIi1bS4uuSx7PfoZ7f ecTYVlTT9aZ1nm4L03DtIX+03uzy X-Google-Smtp-Source: ALg8bN4b6S6iCm99ejluVI4RIGdTAIbWw9BExPwaNFvcsKAb1OwUlKDJHS0hw6BDh/VnyYUTtnWiWQ== X-Received: by 2002:a63:e615:: with SMTP id g21mr11844900pgh.290.1545641292989; Mon, 24 Dec 2018 00:48:12 -0800 (PST) Received: from localhost.localdomain (cpe-23-241-199-231.socal.res.rr.com. [23.241.199.231]) by smtp.gmail.com with ESMTPSA id m67sm57292021pfb.25.2018.12.24.00.48.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 24 Dec 2018 00:48:12 -0800 (PST) From: nbelakovski@gmail.com To: git@vger.kernel.org Cc: peff@peff.net, rafa.almas@gmail.com, gitster@pobox.com, avarab@gmail.com, Nickolai Belakovski Subject: [PATCH v4 3/3] branch: Add an extra verbose output displaying worktree path for refs checked out in a linked worktree Date: Mon, 24 Dec 2018 00:47:56 -0800 Message-Id: <20181224084756.49952-4-nbelakovski@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20181224084756.49952-1-nbelakovski@gmail.com> References: <20181220145931.GB27361@sigill.intra.peff.net> <20181224084756.49952-1-nbelakovski@gmail.com> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Nickolai Belakovski --- builtin/branch.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/builtin/branch.c b/builtin/branch.c index 2a24153b78..56589a3684 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -366,6 +366,10 @@ static char *build_format(struct ref_filter *filter, int maxwidth, const char *r strbuf_addstr(&local, branch_get_color(BRANCH_COLOR_RESET)); strbuf_addf(&local, " %s ", obname.buf); + if (filter->verbose > 2) + strbuf_addf(&local, "%s%%(if:notequals=*)%%(HEAD)%%(then)%%(if)%%(worktreepath)%%(then)%%(worktreepath) %%(end)%%(end)%s", + branch_get_color(BRANCH_COLOR_WORKTREE), branch_get_color(BRANCH_COLOR_RESET)); + if (filter->verbose > 1) strbuf_addf(&local, "%%(if)%%(upstream)%%(then)[%s%%(upstream:short)%s%%(if)%%(upstream:track)" "%%(then): %%(upstream:track,nobracket)%%(end)] %%(end)%%(contents:subject)",