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

MissingObjectException in repos with git alternates #178

Open
azolotko opened this issue Dec 7, 2020 · 1 comment
Open

MissingObjectException in repos with git alternates #178

azolotko opened this issue Dec 7, 2020 · 1 comment

Comments

@azolotko
Copy link

azolotko commented Dec 7, 2020

It seems JGit's RevWalk doesn't support Git alternates. This leads to sbt-git being unable to load projects checked out by TeamCity's VCS root that has "Use mirrors" mechanism enabled. For example,

$ pwd
/data/buildagent/work/aee92f3311be76c5

$ ls .git/objects/a8/04e5fbec3088c2890667aa46712c96b02b5dea
ls: cannot access .git/objects/a8/04e5fbec3088c2890667aa46712c96b02b5dea: No such file or directory

$ cat .git/objects/info/alternates
/data/homedir/buildAgent/system/git/git-0C318551.git/objects

$ ls /data/homedir/buildAgent/system/git/git-0C318551.git/objects/a8/04e5fbec3088c2890667aa46712c96b02b5dea
/data/homedir/buildAgent/system/git/git-0C318551.git/objects/a8/04e5fbec3088c2890667aa46712c96b02b5dea
org.eclipse.jgit.errors.MissingObjectException: Missing unknown a804e5fbec3088c2890667aa46712c96b02b5dea
at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:163)
at org.eclipse.jgit.lib.ObjectReader.open(ObjectReader.java:234)
at org.eclipse.jgit.revwalk.RevWalk.parseAny(RevWalk.java:859)
at org.eclipse.jgit.revwalk.RevWalk.parseCommit(RevWalk.java:772)
at com.typesafe.sbt.git.JGit.$anonfun$headCommitDate$1(JGit.scala:115)
at scala.Option.map(Option.scala:230)
at com.typesafe.sbt.git.JGit.headCommitDate(JGit.scala:114)
at com.typesafe.sbt.SbtGit$.$anonfun$buildSettings$8(SbtGit.scala:117)
at com.typesafe.sbt.git.DefaultReadableGit.withGit(ReadableGit.scala:42)
at com.typesafe.sbt.SbtGit$.$anonfun$buildSettings$7(SbtGit.scala:117)
at scala.Function1.$anonfun$compose$1(Function1.scala:49)
at sbt.internal.util.EvaluateSettings$MixedNode.evaluate0(INode.scala:228)
at sbt.internal.util.EvaluateSettings$INode.evaluate(INode.scala:170)
at sbt.internal.util.EvaluateSettings.$anonfun$submitEvaluate$1(INode.scala:87)
at sbt.internal.util.EvaluateSettings.sbt$internal$util$EvaluateSettings$$run0(INode.scala:99)
at sbt.internal.util.EvaluateSettings$$anon$3.run(INode.scala:94)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
@azolotko
Copy link
Author

azolotko commented Dec 7, 2020

A similar issue in Gerrit's bug tracker.

@azolotko azolotko changed the title Repos with git alternates not working MissingObjectException in repos with git alternates Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant