Skip to content
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.

Added support for symlink checkouts on Windows #776

Closed
wants to merge 9 commits into from
Closed

Added support for symlink checkouts on Windows #776

wants to merge 9 commits into from

Conversation

fkollmann
Copy link

On Windows, elevated rights are required for symlinks.

If they are missing, which is true for almost all users, the library will fail with "A required privilege is not held by the client." (ERROR_PRIVILEGE_NOT_HELD).

This implementation mimics the behavior of Git on Windows.

Copy link
Contributor

@mcuadros mcuadros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also can you 'Signed-off' you commit?

worktree.go Outdated
const ERROR_PRIVILEGE_NOT_HELD syscall.Errno = 1314

if err != nil {
if x, ok := err.(*os.LinkError); ok {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you give a proper name to the variable?

worktree.go Outdated

if err != nil {
if x, ok := err.(*os.LinkError); ok {
if xx, ok := x.Err.(syscall.Errno); ok {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

@mcuadros
Copy link
Contributor

Sorry @fkollmann the "Signed-off-by" is done using the "-s" flag in all the PR commits.

Signed-off-by: Felix Kollmann <felix.kollmann@twinpoint.de>
@fkollmann
Copy link
Author

Okay, so every commit has to be signed-off... I will copy the changes to another branch and create a new pull request, later.

@fkollmann fkollmann closed this Mar 12, 2018
@fkollmann
Copy link
Author

Closed in favor of #778

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants