Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH git-2.eclass 2/2] When constructing storedir, strip trailing '/.git' directory.
Date: Fri, 23 Dec 2011 14:35:11
Message-Id: 1324650896-1286-2-git-send-email-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH git-2.eclass 1/2] Clean up non-bare checkout before updating. by "Michał Górny"
1 Fixes: https://bugs.gentoo.org/show_bug.cgi?id=386845
2 ---
3 eclass/git-2.eclass | 3 ++-
4 1 files changed, 2 insertions(+), 1 deletions(-)
5
6 diff --git a/eclass/git-2.eclass b/eclass/git-2.eclass
7 index 4f0b65b..44e3476 100644
8 --- a/eclass/git-2.eclass
9 +++ b/eclass/git-2.eclass
10 @@ -278,7 +278,8 @@ git-2_prepare_storedir() {
11 if [[ ${EGIT_PROJECT} ]]; then
12 clone_dir=${EGIT_PROJECT}
13 else
14 - clone_dir=${EGIT_REPO_URI##*/}
15 + local strippeduri=${EGIT_REPO_URI%/.git}
16 + clone_dir=${strippeduri##*/}
17 fi
18 EGIT_DIR=${EGIT_STORE_DIR}/${clone_dir}
19
20 --
21 1.7.8.352.g876a6f.dirty