[PATCH v4 0/1] receive-pack: optionally deny case clone refs
- From
David Turner <dturner@twopensource.com>
- Date
- Jun 11, 2014, 22:30 UTC
- Message-ID
- <1402525838-31975-1-git-send-email-dturner@twitter.com>
This issue bit us again recently.
In talking with some colleagues, I realized that the previous version of this patch, in addition to being potentially slow, was incomplete. Specifically, it didn't handle the case of refs/heads/case/one vs refs/heads/CASE/two; these are case clones even though they strcasecmp different.
This new version contains code to prevent this, as well as tests for this case.
Also it uses a hashmap to make lookups constant-time.