Commit cc564f92 by Patrick Ohly

verify-subtree.sh: relax check and ignore old content

If for whatever reasons a repo already had a `release-tools` directory before doing a clean import of it with `git subtree`, the check used to fail because it found those old commits. This can be fixed by telling `git log` to stop when the directory disappears from the repo. There has to be a commit with removes the old content, because otherwise `git subtree add` doesn't work. Fixes: https://github.com/kubernetes-csi/external-resizer/issues/21
parent 33d58fdc
...@@ -30,7 +30,7 @@ if [ ! "$DIR" ]; then ...@@ -30,7 +30,7 @@ if [ ! "$DIR" ]; then
exit 1 exit 1
fi fi
REV=$(git log -n1 --format=format:%H --no-merges -- "$DIR") REV=$(git log -n1 --remove-empty --format=format:%H --no-merges -- "$DIR")
if [ "$REV" ]; then if [ "$REV" ]; then
echo "Directory '$DIR' contains non-upstream changes:" echo "Directory '$DIR' contains non-upstream changes:"
echo echo
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment