We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f4c0a2 commit d0a01baCopy full SHA for d0a01ba
pre-receive
@@ -23,6 +23,13 @@ export TERM
23
24
while read oldrev newrev refname; do
25
git archive $newrev | tar x -C ${tmptree}
26
+
27
+ # for a new branch oldrev is 0{40}, set newrev to branch name and oldrev to parent branch
28
+ if [[ $oldrev == "0000000000000000000000000000000000000000" ]]; then
29
+ newrev=`git rev-parse --abbrev-ref HEAD`
30
+ oldrev=`git show-branch | ack '\*' | ack -v "$newrev" | head -n1 | sed 's/.*\[\(.*\)\].*/\1/' | sed 's/[\^~].*//'`
31
+ fi
32
33
for changedfile in $(git diff --name-only $oldrev $newrev --diff-filter=ACM); do
34
tmpmodule="$tmptree/$changedfile"
35
#check puppet manifest syntax
0 commit comments