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

Re: [PATCH v2] Add support for GIT_CEILING_DIRS

From
DRDavid Reiss <dreiss@facebook.com>
Date
May 15, 2008, 07:11 UTC
Message-ID
<482BE238.5020309@facebook.com>
In-Reply-To
<482BE0EB.6040306@viscovery.net>
> If you make it so that the default value of ceil_offset is 0 (i.e. in the
> absence of any GIT_CEILING_DIRS),
This is what the new version of the patch does.
Show 5 quoted lines
> and at this place you did
> 
>                 } while (offset > ceil_offset && cwd[--offset] != '/');
> 
> you wouldn't have to bend backwards with this off-by-one magic, would you?

It seems like that would cause it to continue on with the outer loop, rather than aborting (which is what the current version does) when you hit the ceiling. Or maybe I'm misunderstanding something.

--David
Previous: Johannes SixtNext: Johannes Sixt
Message 3 of 7 in “Add support for GIT_CEILING_DIRS”
  1. Add support for GIT_CEILING_DIRSDavid Reiss, May 15, 2008
  2. Johannes SixtMay 15, 2008
  3. David ReissMay 15, 2008
  4. Johannes SixtMay 15, 2008
  5. Johannes SchindelinMay 15, 2008
  6. David ReissMay 15, 2008
  7. Johannes SchindelinMay 15, 2008

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.