Add gitdiff
This commit is contained in:
parent
d54f37d3b6
commit
1c344e0c60
3 changed files with 18 additions and 9 deletions
|
@ -10,15 +10,13 @@ commit=$2
|
|||
|
||||
##
|
||||
# functions
|
||||
gitexec()
|
||||
diff()
|
||||
{
|
||||
"${libexec}"/utils/gitexec "${1}"
|
||||
"${libexec}"/utils/gitdiff ${@}
|
||||
}
|
||||
|
||||
##
|
||||
# main
|
||||
cd "${gitdir}"
|
||||
add=$(gitexec "diff --name-only --diff-filter=A ${commit} HEAD")
|
||||
mod=$(gitexec "diff --name-only --diff-filter=M ${commit} HEAD")
|
||||
echo "${add}"
|
||||
echo "${mod}"
|
||||
diff "--name-only" "--diff-filter=A" "${commit}" "HEAD"
|
||||
diff "--name-only" "--diff-filter=M" "${commit}" "HEAD"
|
||||
|
|
|
@ -10,12 +10,12 @@ commit=$2
|
|||
|
||||
##
|
||||
# functions
|
||||
gitexec()
|
||||
diff()
|
||||
{
|
||||
"${libexec}"/utils/gitexec "${1}"
|
||||
"${libexec}"/utils/gitdiff ${@}
|
||||
}
|
||||
|
||||
##
|
||||
# main
|
||||
cd "${gitdir}"
|
||||
gitexec "diff --name-only --diff-filter=D ${commit} HEAD"
|
||||
diff "--name-only" "--diff-filter=D" "${commit}" "HEAD"
|
||||
|
|
11
libexec/sourcezap/utils/gitdiff
Executable file
11
libexec/sourcezap/utils/gitdiff
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
##
|
||||
# variables
|
||||
localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/../../..)}
|
||||
libexec="${localbase}"/libexec/sourcezap
|
||||
|
||||
##
|
||||
# main
|
||||
"${libexec}"/utils/gitexec diff -l0 ${@}
|
Loading…
Reference in a new issue