Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

.git subdirectory is created in the wrong place on checkout when using relative directory #359

@qbprog

Description

@qbprog

Testing git for windows 2.4.3 2nd release candidate. I can reproduce it using Windows 8.1 64bit (on 2 pcs) , but not using Windows 7 64bit. Reproducing it only when calling from command prompt (not bash), and also using the eclipse debugger.

When calling a clone command like this

C:> git clone http://..../path local_dir
or also
C:> git clone C:\dir local_dir

the .git directory is created inside local_dir\local_dir.git instead of local_dir.git

this happens only if local_dir is passed as a relative path AND if the current directory is the root of a drive. Using an absolute path it works:

C:>git clone C:\dir C:\local_dir
works
AND it works if the current directory is different from root
C:\test>git clone C:\dir local_dir

since it was not easily reproducible I set-up the sdk and debugged the exe with eclipse. On a first glipse it seems that the current directory is not correctly restored in one of the intermediate clone steps. I hope to find the exact failure during next week.

probably chdir doesn't works correctly if you try to set back the directory to root ?
abspath.c:145 <--- maybe here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions