1

The following code:

final git = Grgit.open("${oldVersionRoot}/.git")
git.fetch(refSpecs: ["release/${oldVersion}"])

emits:

Caused by: org.eclipse.jgit.errors.TransportException: Remote does not have release/2.1747.0 available for fetch.

What's the right incantation to get fetch to work?

Noel Yap
  • 18,822
  • 21
  • 92
  • 144

1 Answers1

1

From https://github.com/ajoberstar/gradle-git/issues/166:

https://github.com/ajoberstar/grgit/blob/master/src/test/groovy/org/ajoberstar/grgit/operation/FetchOpSpec.groovy#L115 indicates using:

git.fetch(refSpecs: ["refs/remotes/origin/release/${oldVersion}"])
Noel Yap
  • 18,822
  • 21
  • 92
  • 144