On Fri, Oct 14, 2022 at 10:04 AM Erik Cervin Edin <erik@xxxxxxxxxxx> wrote: > > > On Fri, Oct 14, 2022 at 6:59 AM Torsten Bögershausen <tboegi@xxxxxx> wrote: > > > > For example, we can use Linux: > > git ls-files | tr 'A-Z' 'a-z' | sort | uniq -d ; echo $? > > In a repo with many files, maybe use git diff --name-only and just run > it periodically as a part of a check-in hook or something? > > git diff --name-only HEAD~100..HEAD | tr 'A-Z' 'a-z' | sort | uniq -d > > [... next email...] > I believe > git diff --name-only > doesn't need a working tree I don't understand this suggestion; doesn't it only catch duplicates where both instances were introduced in the same 100-commit range? That has often or typically not been the case, in my experience. Often one version of the file or folder will have existed for some time (days, months, years), and then a "duplicate" will be introduced. As far as I can tell this "diff large range" approach is quite expensive (37 seconds in a trivial test on this repo), and non-comprehensive.