Re: rebase not honoring core.worktree pointing elsewhere

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

 



Paul Drews wrote:
> Nguyen Thai Ngoc Duy <pclouds <at> gmail.com> writes:

>> Another one: create a .git file with this line and put it in worktree's
>> topdir
>> 
>> gitdir: /path/to/real/git.dir
>> 
>> See gitrepository-layout.txt.
>
> Ooh!  That would be my favorite, since it's a documented legal usage.

By the way, .git symlinks have been historically supported and are not
likely to break, either.  Maybe gitrepository-layout should grow to
include a section on the repository search.

> Unfortunately, although the rebase scenario works that way a local
> "git clone" doesn't work:
> 
> # git clone /abs/path/to/proj
> Cloning into proj...
> fatal: failed to open '/abs/path/to/proj/objects': No such file or directory

enter_repo() never learned .git file support, though I see no reason it should
be hard to add.

Pointers:

 - v1.5.6-rc0~93^2~3 (Add platform-independent .git "symlink",
   2008-02-20)

 - v0.99.9l^2 (daemon.c and path.enter_repo(): revamp path validation,
   2005-12-03)

The precise return value from enter_repo() is currently only used by
"git daemon", to handle directory arguments as in

	git daemon -- /srv/git

so returning a fictional path like

	/abs/path/to/proj/.git

might work ok. :)

Good catch.
--
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]