Thread (2 messages) flat view 2 messages, 2 authors, 2026-02-10

git fetch --dry-run can modify the repo

From: Tyler Breisacher <hidden>
Date: 2026-02-10 05:33:46

Interesting bug we came across -- or at least I think it's a bug. In
any git repo that is not a shallow clone:

$ cat .git/shallow # "No such file or directory"
$ git fetch --depth=1 --dry-run
$ cat .git/shallow # Prints a git sha

I would think no command should make any changes to the local repo if
--dry-run is passed.

Thanks!

Tyler
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help