Re: [PATCH] Handle double slashes in make_relative_path()

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

 



On Samstag, 23. Januar 2010, Junio C Hamano wrote:
> Junio C Hamano <gitster@xxxxxxxxx> writes:
> > I think one issue is what happens when you did this:
> >
> >     cd //server
> >     git --git-dir=//server/repo/repo.git --work-tree=repo
> >
> > Does msysgit implementation figures out that the work tree is located at
> > "//server/repo" when get_git_work_tree() is asked to produce an absolute
> > path so that it can be compared with //server/repo/repo.git with the
> > code? If it does (with the leading double slash), then "doubled slahses
> > fix" is a regression we should do something about it.  If it doesn't,
> > then it probably doesn't matter.
>
> Nah, I wasn't thinking straight.  What happens if you did this?
>
> 	git --git-dir=//git/repo/repo.git --work-tree=/git/repo
>
> where "//git/repo" is on the "git server" and you are working in local
> hierarchy "/git/repo"?

Ah, right, this would not do the right thing. (But I can't verify this claim 
right now.)

The problem is that /git/repo without a drive prefix is a valid path and it 
means the path that begins at the same drive that CWD currently is. I would 
not dismiss this form of paths as too exotic, so we should care about them. 
OTOH, it can be worked around easily by the user (just insert the drive 
prefix). Dunno...

-- Hannes
--
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]