Fix pull.sh: tambah auto-fix untuk dubious ownership issue

This commit is contained in:
mwpn
2025-12-18 11:32:08 +07:00
parent adffd851ed
commit d632680726

View File

@@ -11,6 +11,13 @@ if [ ! -d ".git" ]; then
exit 1 exit 1
fi fi
# Fix dubious ownership jika perlu
REPO_PATH=$(pwd)
if ! git config --global --get-regexp "safe.directory" | grep -q "$REPO_PATH"; then
echo "🔒 Adding safe.directory untuk fix ownership issue..."
git config --global --add safe.directory "$REPO_PATH"
fi
# Cek branch saat ini # Cek branch saat ini
CURRENT_BRANCH=$(git branch --show-current) CURRENT_BRANCH=$(git branch --show-current)
echo "📍 Current branch: $CURRENT_BRANCH" echo "📍 Current branch: $CURRENT_BRANCH"
@@ -33,4 +40,3 @@ echo "✅ Pull selesai!"
echo "" echo ""
echo "📊 Status:" echo "📊 Status:"
git status --short git status --short