git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Efficiently detecting paths that differ from each other only in case
@ 2010-10-08  6:13 Dun Peal
  2010-10-08 13:50 ` Jeff King
  0 siblings, 1 reply; 14+ messages in thread
From: Dun Peal @ 2010-10-08  6:13 UTC (permalink / raw)
  To: git

Hi,

I'm writing a Git hook, for a bare central repo, to reject pushes of
paths that differ from existing tracked paths only by letter case.

So, for example, if the following path is tracked in the repo:

foo/bar.py

Commits adding any of the following paths would be rejected:

Foo/bar.py
foo/Bar.py
fOO/BAR.py

Etc. I know how to do it by listing paths with ls-files, but my repo
contains many thousands of files, so I was wondering if there was a
more efficient way than for every commit:

1. Get a list of all paths in the repo from ls-files.
2. Lowercase all paths.
3. Check for repeats.

Thanks, D

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

end of thread, other threads:[~2010-10-17  4:25 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-08  6:13 Efficiently detecting paths that differ from each other only in case Dun Peal
2010-10-08 13:50 ` Jeff King
2010-10-08 19:44   ` Dun Peal
2010-10-08 19:51     ` Jeff King
2010-10-08 19:57       ` Dun Peal
2010-10-08 20:06         ` Jeff King
2010-10-08 22:57           ` Dun Peal
2010-10-09  8:47             ` Jakub Narebski
2010-10-09 22:00               ` Dun Peal
2010-10-09 22:31                 ` Jakub Narebski
2010-10-11  3:07             ` Jeff King
2010-10-16 22:37               ` Dun Peal
2010-10-17  4:25                 ` Jeff King
2010-10-08 19:56     ` Jonathan Nieder

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).