From 5b86caec44e55f4de7c5252fcb9155d2541c6f89 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Sep 2025 13:56:36 +0000 Subject: [PATCH 1/4] Initial plan From 99d0063da654f97ff6777a8e201f2d211d5e5dd6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Sep 2025 14:05:39 +0000 Subject: [PATCH 2/4] Fix Microsoft Git install to use releases API for 'latest' Co-authored-by: markphip <933108+markphip@users.noreply.github.com> --- src/microsoft-git/install.sh | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/microsoft-git/install.sh b/src/microsoft-git/install.sh index 6c151dc..375cb7c 100755 --- a/src/microsoft-git/install.sh +++ b/src/microsoft-git/install.sh @@ -44,15 +44,25 @@ fi # Partial version matching if [ "$(echo "${GIT_VERSION}" | grep -o '\.' | wc -l)" != "2" ]; then requested_version="${GIT_VERSION}" - version_list="$(curl -sSL -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/microsoft/git/tags?per_page=100" | grep -oP '"name":\s*"v\K[0-9]+\.[0-9]+\.[0-9]+\.vfs\.[0-9]+\.[0-9]+"' | tr -d '"' | sort -rV)" - if [ "${requested_version}" = "latest" ] || [ "${requested_version}" = "lts" ] || [ "${requested_version}" = "current" ]; then - GIT_VERSION="$(echo "${version_list}" | head -n 1)" + if [ "${requested_version}" = "latest" ]; then + # For latest, use the releases API to get the actual latest release + GIT_VERSION="$(curl -sSL -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/microsoft/git/releases/latest" | grep -oP '"tag_name":\s*"v\K[0-9]+\.[0-9]+\.[0-9]+\.vfs\.[0-9]+\.[0-9]+"' | tr -d '"')" else - set +e - GIT_VERSION="$(echo "${version_list}" | grep -E -m 1 "^${requested_version//./\\.}([\\.\\s]|$)")" - set -e + # For other cases (lts, current, partial versions), use the existing tags logic + version_list="$(curl -sSL -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/microsoft/git/tags?per_page=100" | grep -oP '"name":\s*"v\K[0-9]+\.[0-9]+\.[0-9]+\.vfs\.[0-9]+\.[0-9]+"' | tr -d '"' | sort -rV)" + if [ "${requested_version}" = "lts" ] || [ "${requested_version}" = "current" ]; then + GIT_VERSION="$(echo "${version_list}" | head -n 1)" + else + set +e + GIT_VERSION="$(echo "${version_list}" | grep -E -m 1 "^${requested_version//./\\.}([\\.\\s]|$)")" + set -e + fi + if [ -z "${GIT_VERSION}" ] || ! echo "${version_list}" | grep "^${GIT_VERSION//./\\.}$" > /dev/null 2>&1; then + echo "Invalid git version: ${requested_version}" >&2 + exit 1 + fi fi - if [ -z "${GIT_VERSION}" ] || ! echo "${version_list}" | grep "^${GIT_VERSION//./\\.}$" > /dev/null 2>&1; then + if [ -z "${GIT_VERSION}" ]; then echo "Invalid git version: ${requested_version}" >&2 exit 1 fi From ba765471c925fd6df626d4bba2c45e8bcadae2c2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Sep 2025 14:13:28 +0000 Subject: [PATCH 3/4] Treat lts, current, and latest as synonyms using releases API All three version types (latest, lts, current) now use the GitHub releases API to get the actual latest release, ensuring they all get properly released versions instead of potentially unreleased development tags. Co-authored-by: markphip <933108+markphip@users.noreply.github.com> --- src/microsoft-git/install.sh | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/microsoft-git/install.sh b/src/microsoft-git/install.sh index 375cb7c..eaa1b83 100755 --- a/src/microsoft-git/install.sh +++ b/src/microsoft-git/install.sh @@ -44,19 +44,15 @@ fi # Partial version matching if [ "$(echo "${GIT_VERSION}" | grep -o '\.' | wc -l)" != "2" ]; then requested_version="${GIT_VERSION}" - if [ "${requested_version}" = "latest" ]; then - # For latest, use the releases API to get the actual latest release + if [ "${requested_version}" = "latest" ] || [ "${requested_version}" = "lts" ] || [ "${requested_version}" = "current" ]; then + # For latest, lts, and current, use the releases API to get the actual latest release GIT_VERSION="$(curl -sSL -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/microsoft/git/releases/latest" | grep -oP '"tag_name":\s*"v\K[0-9]+\.[0-9]+\.[0-9]+\.vfs\.[0-9]+\.[0-9]+"' | tr -d '"')" else - # For other cases (lts, current, partial versions), use the existing tags logic + # For partial versions, use the existing tags logic version_list="$(curl -sSL -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/microsoft/git/tags?per_page=100" | grep -oP '"name":\s*"v\K[0-9]+\.[0-9]+\.[0-9]+\.vfs\.[0-9]+\.[0-9]+"' | tr -d '"' | sort -rV)" - if [ "${requested_version}" = "lts" ] || [ "${requested_version}" = "current" ]; then - GIT_VERSION="$(echo "${version_list}" | head -n 1)" - else - set +e - GIT_VERSION="$(echo "${version_list}" | grep -E -m 1 "^${requested_version//./\\.}([\\.\\s]|$)")" - set -e - fi + set +e + GIT_VERSION="$(echo "${version_list}" | grep -E -m 1 "^${requested_version//./\\.}([\\.\\s]|$)")" + set -e if [ -z "${GIT_VERSION}" ] || ! echo "${version_list}" | grep "^${GIT_VERSION//./\\.}$" > /dev/null 2>&1; then echo "Invalid git version: ${requested_version}" >&2 exit 1 From b08f4cd65c4b8dc8a3550ebf4fe1c06a85f967bc Mon Sep 17 00:00:00 2001 From: Mark Phippard Date: Wed, 3 Sep 2025 10:21:19 -0400 Subject: [PATCH 4/4] Bump Microsoft Git version to 1.0.7 --- src/microsoft-git/devcontainer-feature.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/microsoft-git/devcontainer-feature.json b/src/microsoft-git/devcontainer-feature.json index ebad89b..c36c9ca 100644 --- a/src/microsoft-git/devcontainer-feature.json +++ b/src/microsoft-git/devcontainer-feature.json @@ -1,18 +1,18 @@ { "name": "Microsoft Git for monorepo with GVFS support", "id": "microsoft-git", - "version": "1.0.6", + "version": "1.0.7", "description": "A fork of Git containing Microsoft-specific patches", "options": { "version": { "type": "string", "proposals": [ "latest", - "2.43.0.vfs.0.0", - "2.42.0.vfs.0.3", - "2.40.1.vfs.0.2", - "2.39.2.vfs.0.0", - "2.38.1.vfs.0.1" + "2.50.1.vfs.0.2", + "2.50.1.vfs.0.1", + "2.50.1.vfs.0.0", + "2.49.0.vfs.0.4", + "2.49.0.vfs.0.3" ], "default": "latest", "description": "Select version of Microsoft Git, if not latest."