git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bug] git fetch --dry-run --filter makes changes to .git/config
@ 2025-09-17 14:44 Kevin Puetz
  2025-09-17 21:21 ` brian m. carlson
  0 siblings, 1 reply; 10+ messages in thread
From: Kevin Puetz @ 2025-09-17 14:44 UTC (permalink / raw)
  To: git@vger.kernel.org

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-09-19 15:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-17 14:44 [Bug] git fetch --dry-run --filter makes changes to .git/config Kevin Puetz
2025-09-17 21:21 ` brian m. carlson
2025-09-17 23:23   ` Kevin Puetz
2025-09-18 19:20     ` Jeff King
2025-09-18 20:28       ` Junio C Hamano
2025-09-18 20:39         ` Jeff King
2025-09-18 20:46           ` Junio C Hamano
2025-09-18 21:55       ` Kevin Puetz
2025-09-18 22:21         ` rsbecker
2025-09-19 15:31           ` Kevin Puetz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).