From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 0127cdd7 for ; Sun, 24 Nov 2019 22:52:53 +0000 (UTC) Received: (qmail 19112 invoked by alias); 23 Nov 2019 22:15:43 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 44919 Received: (qmail 3664 invoked by uid 1010); 23 Nov 2019 22:15:43 -0000 X-Qmail-Scanner-Diagnostics: from mail-lf1-f53.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.0/25635. spamassassin: 3.4.2. Clear:RC:0(209.85.167.53):SA:0(-2.0/5.0):. Processed in 5.095533 secs); 23 Nov 2019 22:15:43 -0000 X-Envelope-From: mezin.alexander@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.167.53 as permitted sender) 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=LLbo1XPCRsL8nBFhSww4ScqOrYSl7wcuO76iRoSiVQ4=; b=bGw5c3N27K52PgmQdLCg2ilamWi3nDGzZZDEaG5h685H1jIeLm6utckT5qMKODoyxo p+Zhe7+wxm9+aNufc/5V91WmmMhIl51gDtIXTUCvPeaheAt9KzefiTe7asivpAjKEimn 0ceveOXRcbHl081K+mFShYsTFgHzwiaqfT8oWwroeUkfa9of/GiVG3J/luuRKFIYk0Ez R6dO1j6ljiBbdvedn+HGLmEpU/xNlbVsJgbCePKpAhBnL21GdokgulZlgdMDfQKnRGEx b9bNeiEfDlvFsnDl75e0Ojv/DcHz9v/pR6B5PiU2B1/nj8ZduwxS3bkG3XAbBMUajzxE CUGg== 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=LLbo1XPCRsL8nBFhSww4ScqOrYSl7wcuO76iRoSiVQ4=; b=WzGenHgi0jxaEVUJvCdfdC+3pLhuy4ITv3Z2Cp9zaxIIwLbUV0bxPsw3XO/oMIhGsQ GY+t7FTjl3NQxpkqA96zdznK37YqTRE1/g129YX1rkOjbc+wu1gX/P33iAuCQQtA5FL0 JyAIHZO2l/LDfQtjWtWMEnzgV5IAnhP+wgZ1A6pHCB1RPf7RE7aJkrTSOn5NpRBBZ1ph 3DmRCnh9dbNxOY+eY6xpJVLRMtwIMezdDLIKGpAbYBBqi7PKViSNIH5qpVXtYh2wZIFz d5hLQrt5KNj+QSinmN5qWhfz/li//ygYgvpQtvxhVh/b1r5V5lMTpL/mAHWBCABw2qt/ Vk7w== X-Gm-Message-State: APjAAAUuxAYQVP2Cn0tBoQm/3ZDgo5WcnGmE0f5M/yAt/ODaPn70LaXL 52ulnh7GLHBVQu+Pjpsu51LoAVaUCaG9EA== X-Google-Smtp-Source: APXvYqxxgXsRWhOEe/nnOk36WCaNFzKTe7h0TMZnzEkT1TIq/aEBly/4BBJ8LmAn9SBMhBACeULA9g== X-Received: by 2002:ac2:4191:: with SMTP id z17mr5225104lfh.22.1574547303820; Sat, 23 Nov 2019 14:15:03 -0800 (PST) From: Aleksandr Mezin To: zsh-workers@zsh.org Cc: Aleksandr Mezin Subject: [PATCH 1/3] vcs_info/git: set vcs_comm[basedir] in VCS_INFO_detect_git Date: Sun, 24 Nov 2019 04:14:41 +0600 Message-Id: <20191123221443.279556-2-mezin.alexander@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191123221443.279556-1-mezin.alexander@gmail.com> References: <20191123221443.279556-1-mezin.alexander@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Qmail-Scanner-2.11: added fake Content-Type header Content-Type: text/plain --- Functions/VCS_Info/Backends/VCS_INFO_detect_git | 1 + Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Functions/VCS_Info/Backends/VCS_INFO_detect_git b/Functions/VCS_Info/Backends/VCS_INFO_detect_git index 61bc483e3..a3dbca105 100644 --- a/Functions/VCS_Info/Backends/VCS_INFO_detect_git +++ b/Functions/VCS_Info/Backends/VCS_INFO_detect_git @@ -8,6 +8,7 @@ setopt localoptions NO_shwordsplit if VCS_INFO_check_com ${vcs_comm[cmd]} && ${vcs_comm[cmd]} rev-parse --is-inside-work-tree &> /dev/null ; then vcs_comm[gitdir]="$(${vcs_comm[cmd]} rev-parse --git-dir 2> /dev/null)" || return 1 + vcs_comm[basedir]="$( ${vcs_comm[cmd]} rev-parse --show-toplevel )" || return 1 if [[ -d ${vcs_comm[gitdir]}/svn ]] ; then vcs_comm[overwrite_name]='git-svn' elif [[ -d ${vcs_comm[gitdir]}/refs/remotes/p4 ]] ; then vcs_comm[overwrite_name]='git-p4' ; fi return 0 diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git index ceb4f978a..8ecd96ccc 100644 --- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git +++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git @@ -138,7 +138,7 @@ VCS_INFO_git_handle_patches () { gitdir=${vcs_comm[gitdir]} VCS_INFO_git_getbranch ${gitdir} -gitbase=$( ${vcs_comm[cmd]} rev-parse --show-toplevel ) +gitbase=${vcs_comm[basedir]} rrn=${gitbase:t} if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" get-revision ; then gitsha1=$(${vcs_comm[cmd]} rev-parse --quiet --verify HEAD) -- 2.24.0