diff options
author | 2006-06-18 14:48:48 -0700 | |
---|---|---|
committer | 2006-06-18 14:48:48 -0700 | |
commit | 13574722f08894d57ebd41414403e2b1ef8e834e (patch) | |
tree | 98ddd27c779bfd99f94cc386b073dedc1178163e /eclass | |
parent | Install eselect man pages (diff) | |
download | dberkholz-13574722f08894d57ebd41414403e2b1ef8e834e.tar.gz dberkholz-13574722f08894d57ebd41414403e2b1ef8e834e.tar.bz2 dberkholz-13574722f08894d57ebd41414403e2b1ef8e834e.zip |
Merge in ferdy's latest changes to git.eclass from bug #132383 attachment #89324
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/git.eclass | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/eclass/git.eclass b/eclass/git.eclass index f53484f..c135ab0 100644 --- a/eclass/git.eclass +++ b/eclass/git.eclass @@ -29,7 +29,7 @@ DESCRIPTION="Based on the ${ECLASS} eclass" ## -- add git in DEPEND # -DEPEND="dev-util/git" +DEPEND=">=dev-util/git-1.4.0" ## -- EGIT_STORE_DIR: git sources store directory @@ -43,12 +43,15 @@ EGIT_FETCH_CMD="git clone --bare" ## -- EGIT_UPDATE_CMD: git fetch command # -EGIT_UPDATE_CMD="git fetch -f -n -u" +EGIT_UPDATE_CMD="git fetch -f -u" +## -- EGIT_DIFFSTAT_CMD: Command to get diffstat output +# +EGIT_DIFFSTAT_CMD="git diff --stat" ## -- EGIT_OPTIONS: # -# the options passed to checkout or update. +# the options passed to clone and fetch. # : ${EGIT_OPTIONS:=} @@ -190,15 +193,18 @@ function git_fetch() { || die "${EGIT}: can't fetch from ${EGIT_REPO_URI}." # We use --bare cloning, so git doesn't do this for us. - mkdir ${EGIT_PROJECT}/remotes - echo "URL: ${EGIT_REPO_URI}" > ${EGIT_PROJECT}/remotes/origin + git repo-config remote.origin.url "${EGIT_REPO_URI}" else # fetch updates einfo "git update start -->" einfo " repository: ${EGIT_REPO_URI}" - GIT_DIR=${EGIT_PROJECT} ${EGIT_UPDATE_CMD} ${EGIT_OPTIONS} origin ${EGIT_BRANCH} \ + local oldsha1=$(git rev-parse ${EGIT_BRANCH}) + + ${EGIT_UPDATE_CMD} ${EGIT_OPTIONS} origin ${EGIT_BRANCH}:${EGIT_BRANCH} \ || die "${EGIT}: can't update from ${EGIT_REPO_URI}." + + ${EGIT_DIFFSTAT_CMD} ${oldsha1}..${EGIT_BRANCH} fi einfo " local clone: ${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}" @@ -216,6 +222,8 @@ function git_fetch() { eend $? fi + einfo " committish: ${EGIT_TREE}" + # export to the ${WORKDIR} mkdir "${S}" git tar-tree ${EGIT_TREE} | ( cd "${S}" ; tar xf - ) |