Skip to content

Symlink fixtures/26231/exe breaks git and doesn't work on windows #60

@veqryn

Description

@veqryn

I've checkout out this repository, and also use it as a dependency in some golang work I do.
Unfortunately, git always shows there is a difference in this file:

MinGW 06:57:54 ~/.glide/cache/src/https-gh.seave.top-prometheus-procfs$ git diff
diff --git a/fixtures/26231/exe b/fixtures/26231/exe
index a91bec4..690239f 120000
--- a/fixtures/26231/exe
+++ b/fixtures/26231/exe
@@ -1 +1 @@
-/usr/bin/vim
\ No newline at end of file
+C:/usr/bin/vim
\ No newline at end of file

Even I check it out multiple times:

MinGW 06:57:39 ~/.glide/cache/src/https-gh.seave.top-prometheus-procfs$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   fixtures/26231/exe

no changes added to commit (use "git add" and/or "git commit -a")
MinGW 06:57:42 ~/.glide/cache/src/https-gh.seave.top-prometheus-procfs$ git checkout fixtures/26231/exe
MinGW 06:57:50 ~/.glide/cache/src/https-gh.seave.top-prometheus-procfs$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   fixtures/26231/exe

no changes added to commit (use "git add" and/or "git commit -a")

It appears to be a symlink, that gets changed on checkout for some reason:

MinGW 06:58:31 ~/.glide/cache/src/https-gh.seave.top-prometheus-procfs/fixtures/26231$ ls -la
total 20
drwxr-xr-x 1 cduncan 1049089    0 Aug  1 18:57 ./
drwxr-xr-x 1 cduncan 1049089    0 Aug  1 18:57 ../
-rw-r--r-- 1 cduncan 1049089   16 Aug  1 18:41 cmdline
-rw-r--r-- 1 cduncan 1049089    4 Aug  1 18:41 comm
lrwxrwxrwx 1 cduncan 1049089   14 Aug  1 18:57 exe -> /c/usr/bin/vim
drwxr-xr-x 1 cduncan 1049089    0 Aug  1 18:57 fd/
-rw-r--r-- 1 cduncan 1049089  116 Aug  1 18:41 io
-rw-r--r-- 1 cduncan 1049089 1213 Aug  1 18:41 limits
-rw-r--r-- 1 cduncan 1049089 1004 Aug  1 18:41 mountstats
-rw-r--r-- 1 cduncan 1049089  330 Aug  1 18:41 stat

Besides git always showing it is changed, it also breaks our dependency management (glide):

MinGW 06:44:19 ~/workspace/go/src/github.com/ReturnPath/apollo/scratch$ glideup
[WARN]  The --update-vendored flag is deprecated. This now works by default.
[WARN]  The --strip-vcs flag is deprecated. This now works by default.
[INFO]  Downloading dependencies. Please wait...
[INFO]  --> Fetching updates for github.com/prometheus/client_golang
[INFO]  --> Fetching updates for github.com/ventu-io/slog
[INFO]  Resolving imports
[INFO]  --> Fetching updates for github.com/prometheus/client_model
[INFO]  --> Fetching updates for github.com/prometheus/common
[INFO]  --> Fetching updates for github.com/prometheus/procfs
[ERROR] Error looking for github.com/prometheus/procfs: github.com/prometheus/procfs contains uncommitted changes. Skipping update
[ERROR] Failed to retrieve a list of dependencies: Error resolving imports

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions