Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status is always returning linux unchanged linux sym links as unstaged modified files #30

Closed
billmag opened this issue May 29, 2014 · 6 comments
Labels

Comments

@billmag
Copy link

billmag commented May 29, 2014

When I run status().isClean() on my repository, it always returns false because I have a symlink in it.

billmag:~/code/github/android-sdk$ git status
On branch feature/release-script
nothing to commit, working directory clean'

The value of Grgit.open('.').status() is:

org.ajoberstar.grgit.Status(staged:org.ajoberstar.grgit.Status$Changes(added:[], modified:[], removed:[]), unstaged:org.ajoberstar.grgit.Status$Changes(added:[], modified:[android-sdk-base/src], removed:[]))

It is a symlink, to elsewhere in the repository, but it's certainly unchanged and I can confirm it works in a fresh checkout:

billmag:~/code/github/android-sdk$ ls -la android-sdk-base/src
lrwxr-xr-x  1 billmag  staff  28 May 19 19:32 android-sdk-base/src -> android-sdk-base-private/src
@ajoberstar
Copy link
Owner

Unfortunately, JGit (which underlies all of Grgit's functionality) does not support symlinks right now. See this JGit issue.

Let me know if you don't that's the problem you're having.

@steven-aerts
Copy link

JGit issue [354367|https://bugs.eclipse.org/bugs/show_bug.cgi?id=354367] has now been fixed.

@ajoberstar ajoberstar added bug and removed cantfix labels Jan 18, 2015
@ajoberstar ajoberstar reopened this Jan 18, 2015
@Lasagna220
Copy link

I am still exeriencing this issue using 'org.ajoberstar:grgit:1.3.0'. My repository has a few symlinks in it and grgit.status() treats them as unstaged changes:

org.ajoberstar.grgit.Status(staged:org.ajoberstar.grgit.Status$Changes(added:[], modified:[], removed:[]), unstaged:org.ajoberstar.grgit.Status$Changes(added:[], modified:[platform/messaging-service/index.md, platform/insurance-card-scanning/ocr/lib/libocr.so, build.gradle, platform/configuration-service/index.md, platform/core/index.md], removed:[]))

From the command line, git status returns:

# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
# 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:   build.gradle
#
no changes added to commit (use "git add" and/or "git commit -a")

@ajoberstar
Copy link
Owner

Can you post your buildscript block?

@Lasagna220
Copy link

buildscript {
  dependencies {
    classpath 'org.ajoberstar:grgit:1.3.0'
  }
  repositories {
    mavenCentral()
  }
}

@ajoberstar
Copy link
Owner

Could your issue be related to #69? I'll be upgrading the JGit dependency with 1.4.0 (but you could try it yourself in the meantime).

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

No branches or pull requests

4 participants