You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Function to get the default branch of the upstream remote
get_default_branch() {
git remote show upstream | awk '/HEAD branch/ {print $NF}'
}
# Find all git repositories at depth 1 excluding the 'sw/' directory and check for commits on the default upstream branch since the provided time argument
# shellcheck disable=SC2044
for repo in $(find . -maxdepth 2 -mindepth 2 -type d -name ".git" -not -path "./sw/*"); do
repo_dir=$(dirname "$repo")
echo "Repository: $repo_dir"
cd "$repo_dir" || exit
# Fetch the latest data from the upstream remote
git fetch upstream
# Get the default branch of the upstream remote
default_branch=$(get_default_branch)
# Check for commits on the default upstream branch since the provided time argument