Re: [PATCH v2] Add support for GIT_CEILING_DIRS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux