From: Kevin Puetz Date: Wed, 17 Sep 2025 14:44:00 GMT Subject: [Bug] git fetch --dry-run --filter makes changes to .git/config Message-ID: What did you do before the bug happened? (Steps to reproduce your issue) `git fetch origin --refetch --dry-run {commit} --depth=1 --filter=tree:0 --no-auto-gc` What did you expect to happen? (Expected behavior) I expected it to fetch just the one commit object (no blobs, no trees, no history), as a means of checking whether that commit is actually known to the remote. What happened instead? (Actual behavior) the .git/config file was modified, adding [remote "origin"] promisor = true partialclonefilter = tree:0 What's different between what you expected and what actually happened? I did not expect any changes to the local clone (due to the use of --dry-run) Anything else you want to add: Context is https://github.com/conan-io/conan/issues/18949 trying to avoid a full-re-download in the process of checking whether the HEAD commit hash exists in a remote. The command was expected to either be a no-op success, or fail > fatal: remote error: upload-pack: not our ref {commit}" [System Info] git version: git version 2.51.0.windows.1 cpu: x86_64 built from commit: 4d21a77b98af5cf479d8b6f863c2aa94257cd4e1 sizeof-long: 4 sizeof-size_t: 8 shell-path: D:/git-sdk-64-build-installers/usr/bin/sh feature: fsmonitor--daemon libcurl: 8.15.0 OpenSSL: OpenSSL 3.2.4 11 Feb 2025 zlib: 1.3.1 SHA-1: SHA1_DC SHA-256: SHA256_BLK default-ref-format: files default-hash: sha1 uname: Windows 10.0 26100 compiler info: gnuc: 15.2 libc info: no libc information available $SHELL (typically, interactive shell): C:\Program Files\Git\usr\bin\bash.exe [Enabled Hooks] Public