mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
hack/validate/vendor: print diff for modified files
In case some files were modified (rather than merely added or removed), we're curious to see the diff for those. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
parent
9e7d5ac5ea
commit
9d4e81e8bf
1 changed files with 4 additions and 0 deletions
|
@ -13,6 +13,7 @@ validate_vendor_diff(){
|
|||
vndr
|
||||
# check if any files have changed
|
||||
diffs="$(git status --porcelain -- vendor 2>/dev/null)"
|
||||
mfiles="$(echo "$diffs" | awk '/^ M / {print $2}')"
|
||||
if [ "$diffs" ]; then
|
||||
{
|
||||
echo 'The result of vndr differs'
|
||||
|
@ -21,6 +22,9 @@ validate_vendor_diff(){
|
|||
echo
|
||||
echo 'Please vendor your package with github.com/LK4D4/vndr.'
|
||||
echo
|
||||
if [ -n "$mfiles" ] ; then
|
||||
git diff -- "$mfiles"
|
||||
fi
|
||||
} >&2
|
||||
false
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue