This commit is contained in:
parent
7de0fd39a0
commit
3f625d08db
4 changed files with 18 additions and 10 deletions
|
@ -45,7 +45,6 @@ set -x
|
||||||
gitexec "clone ${giturl} ${gitdir}"
|
gitexec "clone ${giturl} ${gitdir}"
|
||||||
cd "${gitdir}"
|
cd "${gitdir}"
|
||||||
gitexec "config core.filemode off"
|
gitexec "config core.filemode off"
|
||||||
gitexec "config diff.renameList 7000"
|
|
||||||
set +x
|
set +x
|
||||||
set +e
|
set +e
|
||||||
gitexec "checkout -t origin/${branch} > /dev/null 2>&1"
|
gitexec "checkout -t origin/${branch} > /dev/null 2>&1"
|
||||||
|
|
|
@ -10,15 +10,13 @@ commit=$2
|
||||||
|
|
||||||
##
|
##
|
||||||
# functions
|
# functions
|
||||||
gitexec()
|
diff()
|
||||||
{
|
{
|
||||||
"${libexec}"/utils/gitexec "${1}"
|
"${libexec}"/utils/gitdiff ${@}
|
||||||
}
|
}
|
||||||
|
|
||||||
##
|
##
|
||||||
# main
|
# main
|
||||||
cd "${gitdir}"
|
cd "${gitdir}"
|
||||||
add=$(gitexec "diff --name-only --diff-filter=A ${commit} HEAD")
|
diff "--name-only" "--diff-filter=A" "${commit}" "HEAD"
|
||||||
mod=$(gitexec "diff --name-only --diff-filter=M ${commit} HEAD")
|
diff "--name-only" "--diff-filter=M" "${commit}" "HEAD"
|
||||||
echo "${add}"
|
|
||||||
echo "${mod}"
|
|
||||||
|
|
|
@ -10,12 +10,12 @@ commit=$2
|
||||||
|
|
||||||
##
|
##
|
||||||
# functions
|
# functions
|
||||||
gitexec()
|
diff()
|
||||||
{
|
{
|
||||||
"${libexec}"/utils/gitexec "${1}"
|
"${libexec}"/utils/gitdiff ${@}
|
||||||
}
|
}
|
||||||
|
|
||||||
##
|
##
|
||||||
# main
|
# main
|
||||||
cd "${gitdir}"
|
cd "${gitdir}"
|
||||||
gitexec "diff --name-only --diff-filter=D ${commit} HEAD"
|
diff "--name-only" "--diff-filter=D" "${commit}" "HEAD"
|
||||||
|
|
11
libexec/portzap/utils/gitdiff
Normal file
11
libexec/portzap/utils/gitdiff
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
##
|
||||||
|
# variables
|
||||||
|
localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/../../..)}
|
||||||
|
libexec="${localbase}"/libexec/portzap
|
||||||
|
|
||||||
|
##
|
||||||
|
# main
|
||||||
|
"${libexec}"/utils/gitexec diff -l0 ${@}
|
Loading…
Reference in a new issue