Jefffrey commented on code in PR #149:
URL: https://github.com/apache/datafusion-site/pull/149#discussion_r2780438228
##########
Makefile:
##########
@@ -32,15 +31,17 @@ clone-repo:
echo "$(REPO_NAME) already exists, skipping clone."; \
fi
-# checks out the specific commit due to
https://github.com/apache/infrastructure-actions/issues/218
-checkout-commit: clone-repo
+# syncs the repository with the latest changes from the main branch
+sync-repo: clone-repo
@cd $(REPO_NAME) && \
- if [ "$$(git rev-parse HEAD)" = "$(COMMIT_HASH)" ]; then \
- echo "Repository is already at commit $(COMMIT_HASH), skipping
checkout."; \
- else \
- echo "Checking out commit $(COMMIT_HASH)..."; \
- git fetch --depth 1 origin $(COMMIT_HASH) && git checkout
$(COMMIT_HASH); \
- fi
+ if [ -n "$$(git status --porcelain)" ]; then \
+ echo "Error: Repository has uncommitted changes. Please clean
the repository first."; \
+ exit 1; \
+ fi; \
+ echo "Syncing with origin/main..."; \
+ git fetch --depth 1 origin main && \
+ git checkout main && \
+ git reset --hard origin/main
Review Comment:
I feel its easier to just be similar to what we did before; fetch & checkout
only
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]