mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
While the `remote.origin.mirror` boolean being set is a very good proxy for having been cloned with `--mirror`, is technically only used when pushing into the remote[1]. What we care about is if fetches from this remote will overwrite `refs/heads/`, or all of `refs/` -- the latter of which is most likely, from having run `git clone --bare`. Detect either of these fetch refspecs, and not the mirror flag. We let the upgrade process error out if `remote.origin.fetch` is unset, as that represents an unexpected state. We ignore failures to unset the `remote.origin.mirror` flag, in case it is not set already. [1]: https://git-scm.com/docs/git-config#Documentation/git-config.txt-remoteltnamegtmirror
7.0 KiB
Executable File
7.0 KiB
Executable File