Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: don't attempt negotiation without any refspec-mappings (#1405)
Previously, when a shallow operation was specified, it was possible to skip past the no-change test and attempt to negotiate even though there was nothing to want. This is now 'fixed' by simply aborting early if there is no refspec mapping at all. Further, it aborts as early as possible with a nicer error message, after all, there is no use in having no mapping. Note that it's explicitly implemented such that obtaining such an empty refmap is fine, but trying to receive it is not. That way, the user can obtain information about the server without anything being an error.
- Loading branch information