Hi J.H.
On Wed, 28 Nov 2018, Houder wrote:
> On 2018-11-28 09:46, Johannes Schindelin wrote:
> >
> > On Wed, 28 Nov 2018, J.H. van de Water wrote:
> >
> > > > > me@work /cygdrive
> > > > > $ ls
> > > > > c d
> > > > >
> > > > > So `/cygdrive` *is* a valid directory in Cygwin.
> > > >
> > > >
On 2018-11-28 09:46, Johannes Schindelin wrote:
Hi J.H.,
On Wed, 28 Nov 2018, J.H. van de Water wrote:
> > me@work /cygdrive
> > $ ls
> > c d
> >
> > So `/cygdrive` *is* a valid directory in Cygwin.
>
> That supports the code that does not special case a path that begins
> with /cygdrive/
Hi J.H.,
On Wed, 28 Nov 2018, J.H. van de Water wrote:
> > > me@work /cygdrive
> > > $ ls
> > > c d
> > >
> > > So `/cygdrive` *is* a valid directory in Cygwin.
> >
> > That supports the code that does not special case a path that begins
> > with /cygdrive/ and simply treats it as a full path
> > me@work /cygdrive
> > $ ls
> > c d
> >
> > So `/cygdrive` *is* a valid directory in Cygwin.
>
> That supports the code that does not special case a path that begins
> with /cygdrive/ and simply treats it as a full path and freely use
> relative path, I guess. Very good point.
Please read
Johannes Schindelin writes:
> It takes a little folding and knotting of the brain to understand that
> this `!skip_dos_drive_prefix()` has *nothing* to do with the comment
> `unc paths` nor with the test whether the paths starts with two directory
> separators.
>
> As a consequence, I would
Johannes Schindelin writes:
>> Sorry, but I fail to see the point the last example wants to make.
>
> I agree. For me, the real test is this:
>
> me@work ~
> $ cd /cygdrive
>
> me@work /cygdrive
> $ ls
> c d
>
> So `/cygdrive` *is* a valid directory in Cygwin.
That supports the code that does
Junio C Hamano writes:
> I wonder if it makes the rest of the code simpler if we stripped
> things like /cygdrive/c here exactly the sam way as we strip C:
> For that, has_dos_drive_prefix() needs to know /cygdrive/[a-z],
> which may not be a bad thing, I guess. Let's read on.
The cygdrive
tbo...@web.de writes:
> The solution is to implement has_dos_drive_prefix(), skip_dos_drive_prefix()
> is_dir_sep(), offset_1st_component() and convert_slashes() for cygwin
> in the same way as it is done in 'Git for Windows' in compat/mingw.[ch]
Please use the Cygwin API path conversion
Hi Junio,
On Tue, 27 Nov 2018, Junio C Hamano wrote:
> Steven Penny writes:
>
> > If you strip the drive, you can still navigate within the same drive:
> >
> > $ cd 'C:\Users'
> > $ pwd
> > /cygdrive/c/Users
> >
> > $ cd '\Windows'
> > $ pwd
> > /cygdrive/c/Windows
> >
Hi Torsten,
On Mon, 26 Nov 2018, tbo...@web.de wrote:
> diff --git a/compat/cygwin.c b/compat/cygwin.c
> index b9862d606d..c4a10cb5a1 100644
> --- a/compat/cygwin.c
> +++ b/compat/cygwin.c
> @@ -1,19 +1,29 @@
> #include "../git-compat-util.h"
> #include "../cache.h"
>
> +int
On Mon, Nov 26, 2018 at 11:23 PM Junio C Hamano wrote:
> Sorry, but I do not see the connection to this question and the
> above example. The reason why we strip C: is because the letter
> that comes after that colon determines if we are talking about
> absolute path (in other words, the current
Steven Penny writes:
> If you strip the drive, you can still navigate within the same drive:
>
> $ cd 'C:\Users'
> $ pwd
> /cygdrive/c/Users
>
> $ cd '\Windows'
> $ pwd
> /cygdrive/c/Windows
>
> but you can no longer traverse drives:
>
> $ cd '\Testing'
> sh: cd:
On Mon, Nov 26, 2018 at 7:16 PM Junio C Hamano wrote:
> I wonder if it makes the rest of the code simpler if we stripped
> things like /cygdrive/c here exactly the sam way as we strip C:
> For that, has_dos_drive_prefix() needs to know /cygdrive/[a-z],
> which may not be a bad thing, I guess.
tbo...@web.de writes:
> Reported-By: Steven Penny
> Signed-off-by: Torsten Bögershausen
> ---
>
> This is the first vesion of a patch.
> Is there a chance that you test it ?
>
> abspath.c | 2 +-
> compat/cygwin.c | 18 ++
> compat/cygwin.h | 32
On Mon, Nov 26, 2018 at 11:32 AM wrote:
> This is the first vesion of a patch.
> Is there a chance that you test it ?
I can confirm that this fixes the issue.
Thank you!
From: Torsten Bögershausen
A regression for cygwin users was introduced with commit 05b458c,
"real_path: resolve symlinks by hand".
In the the commit message we read:
The current implementation of real_path uses chdir() in order to resolve
symlinks. Unfortunately this isn't thread-safe as
16 matches
Mail list logo