Git development
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: David Reiss <dreiss@facebook.com>
Cc: Johannes Sixt <j.sixt@viscovery.net>, git@vger.kernel.org
Subject: Re: [PATCH v2] Add support for GIT_CEILING_DIRS
Date: Thu, 15 May 2008 18:45:44 +0100 (BST)	[thread overview]
Message-ID: <alpine.DEB.1.00.0805151841040.30431@racer> (raw)
In-Reply-To: <482C644F.9090903@facebook.com>

Hi,

On Thu, 15 May 2008, David Reiss wrote:

> The problem with this implementation is that it does not distinguish 
> between GIT_CEILING_DIRS being unset and GIT_CEILING_DIRS="/".  For 
> example...
> 
> cd /
> sudo git init
> cd /home
> git rev-parse --show-prefix
> 
> That series of commands works with either version of my patch, but fails 
> with "fatal: Not a git repository" if I apply this change.  I am 
> certainly open to changing this code, but I think we will always need 
> two separate values of ceil_offset to represent "unset" and "/". It's 
> just a question of whether they should be -1 and 0 or 0 and 1.

You are much more familiar with the code, but I suspect that a simple 
change would fix that:

> >> +             do { } while (offset > ceil_offset && cwd[--offset] != '/');

Just use "--offset >= 0 && cwd[--offset] != '/'" here.  And maybe 
ceil_offset = -1 again.

I cannot quickly test, since I am short on time, and it would be too 
cumbersome to find which patches to apply first.

But I strongly believe that it is not beyond your capabilities to adjust 
Hannes' patch for your command series, keeping the elegance.

Ciao,
Dscho

      reply	other threads:[~2008-05-15 17:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-15  1:35 [PATCH v2] Add support for GIT_CEILING_DIRS David Reiss
2008-05-15  7:06 ` Johannes Sixt
2008-05-15  7:11   ` David Reiss
2008-05-15  8:38     ` Johannes Sixt
2008-05-15  9:06       ` Johannes Schindelin
2008-05-15 16:26         ` David Reiss
2008-05-15 17:45           ` Johannes Schindelin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.1.00.0805151841040.30431@racer \
    --to=johannes.schindelin@gmx.de \
    --cc=dreiss@facebook.com \
    --cc=git@vger.kernel.org \
    --cc=j.sixt@viscovery.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox