git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Efficiently detecting paths that differ from each other only in case

From
Jakub Narebski <jnareb@gmail.com>
Date
Oct 9, 2010, 08:47 UTC
Message-ID
<m3aamng3dt.fsf@localhost.localdomain>
In-Reply-To
<AANLkTi=YQOVYsK6Brq5pMiAdrH3Un7RgrWvYf_pymT=d@mail.gmail.com>
Dun Peal <dunpealer@gmail.com> writes:
> On Fri, Oct 8, 2010 at 3:06 PM, Jeff King <peff@peff.net> wrote:
Show 12 quoted lines
> > Re-reading your original message, I have a few more thoughts.
> >
> > One is that you don't need to do this per-commit. You probably want to
> > do it per-updated-ref, each of which may be pushing many commits. And
> > then you either reject the new ref value or not.
> 
> I think I do, actually, because let's say the developer pushes two
> commits, 1<-2. Suppose commit 1 violates the rule, but commit 2
> reverts the violation. One might think that we don't care, since the
> head will now be on 2, which is a correct state. But in fact we do,
> because this is Git, and anyone may branch of from 1 in the future,
> and voila we have a head in an incorrect state.
Sidenote: why not detect violation earlier, by having pre-commit hook
in each developer repository check for such violation?  It is not as
time sensitive on the local side (when creating a commit, you have to
take some time to write commit message anyway).
See how example pre-commit hook check for "non-ascii" file names.
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Dun PealNext: Dun Peal
Message 8 of 14 in “Efficiently detecting paths that differ from each other only in case”
  1. Dun PealOct 8, 2010
  2. Jeff KingOct 8, 2010
  3. Dun PealOct 8, 2010
  4. Jeff KingOct 8, 2010
  5. Dun PealOct 8, 2010
  6. Jeff KingOct 8, 2010
  7. Dun PealOct 8, 2010
  8. Jakub NarebskiOct 9, 2010
  9. Dun PealOct 9, 2010
  10. Jakub NarebskiOct 9, 2010
  11. Jeff KingOct 11, 2010
  12. Dun PealOct 16, 2010
  13. Jeff KingOct 17, 2010
  14. Jonathan NiederOct 8, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.