Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 06 11:40

    raboof on main

    Added support for different git… Merge pull request #197 from li… (compare)

  • Apr 06 11:40
    raboof closed #197
  • Apr 06 11:40
    raboof closed #196
  • Apr 06 11:38
    raboof commented #197
  • Apr 06 10:20
    liorregev commented #197
  • Apr 06 10:20
    lightbend-cla-validator commented #197
  • Apr 06 10:20
    liorregev synchronize #197
  • Apr 06 09:52
    lightbend-cla-validator commented #197
  • Apr 06 09:52
    liorregev synchronize #197
  • Apr 06 08:41

    raboof on main

    Fix console reader issues (#219… (compare)

  • Apr 06 08:41
    raboof closed #219
  • Apr 05 19:10
    djspiewak synchronize #219
  • Apr 05 18:53
    lightbend-cla-validator commented #219
  • Apr 05 18:53
    djspiewak opened #219
  • Mar 29 14:52
    SethTisue commented #215
  • Mar 29 14:52
    armanbilge commented #215
  • Mar 29 14:51
    SethTisue closed #215
  • Mar 29 14:51
    SethTisue commented #215
  • Mar 29 14:48

    SethTisue on v2.0.0

    (compare)

  • Mar 29 14:36
    SethTisue closed #216
drocsid
@drocsid
but it doesn't say that in the docs
Dale Wijnand
@dwijnand
do you mean where to put useJGit?
yeah that doesn't go in project
drocsid
@drocsid
git.sbt contains useJGit
I put it in /
seems to work but I haven't tested it
Really just using this plugin to see if I can collect the branch names from it. Can I collect the branch names from it?
in a variable or val to work with publish?
drocsid
@drocsid
```
git status Error: Could not find or load main class org.eclipse.jgit.pgm.Main [error] Nonzero exit code (1) running JGit.
I'm going to assume that I need to add JGit as a dependency. Not sure why that's not in the docs
Dale Wijnand
@dwijnand
it is a dependency
drocsid
@drocsid
Hmm maybe I should add that to the docs?
Or can you give an example?
Think I only need it for the build steps.
Dale Wijnand
@dwijnand
Should you add to the docs that JGit is already a dependency?
to be honest if all you need is a little piece of git usage I'd just use the process api, something like:
scala> scala.sys.process.Process("git rev-parse --symbolic-full-name --abbrev-ref HEAD").!!.dropRight(1)
res0: String = master
drocsid
@drocsid
Yeah I thought about that.
So I get the branch information in my shell prompt
Think that comes from enablePlugins(GitBranchPrompt)
Also enabled enablePlugins(GitVersioning)
And the useJGit in git.sbt as discussed above
But I still get git status Error: Could not find or load main class org.eclipse.jgit.pgm.Main [error] Nonzero exit code (1) running JGit.
Is that the expected behavior?
drocsid
@drocsid
seems like it's broken
   // NOTE: this will always return 0 until sbt 0.13.1 due to the use of CustomOutput
     if(code == 0) result else throw new MessageOnlyException("Nonzero exit code (" + code + ")     running JGit.")
drocsid
@drocsid
but I'm on 1.0.2
Added jgit
   "org.eclipse.jgit" % "org.eclipse.jgit" % jgitVersion
really though difficult to use
drocsid
@drocsid
I'll just file an issue. Thanks
Odomontois
@Odomontois
Hi guys. Can I by any chance use sbt-git with sbt 1.0?
Isaac Evans
@0xine_twitter
I'm successfully using it with sbt 1.0.4
Simon Popugaev
@senia-psm
Hello! Where should I put useJGit in multi-project build? I tried to add useJGit to settings of all project, but it fails with Cannot run program "git"
Brian P. Holt
@bpholt
@senia-psm this is a shot in the dark, but you might try useJGit in ThisBuild :=? my hand-wavy understanding of in ThisBuild is that it’s kind of a global override
Simon Popugaev
@senia-psm
@bpholt I've tried this (with no luck):
lazy val MainProjName = project.in(file("."))
  .settings(inThisBuild(Seq(useJGit)))
Unfortunately useJGit is not SettingKey, it's a Setting
And this Setting is already in ThisBuild: https://github.com/sbt/sbt-git/blob/7e380cb63c7741bb42dad37d8f55b2bd917abca3/src/main/scala/com/typesafe/sbt/SbtGit.scala#L152
def useJGit: Setting[_] = gitRunner in ThisBuild := JGitRunner
Simon Popugaev
@senia-psm
I've tried to add GitKeys.gitRunner := JGitRunner to all projects and inThisBuild(Seq(GitKeys.gitRunner := JGitRunner)) to root. Same result.
Brian P. Holt
@bpholt
Hmm, that’s too bad. Sorry it didn’t help 🙁
Philipp Hoffmann
@philipphoffmann
hey everybody, first of all, great extension, very useful, i have a question though. we are using this extension as a dependency in one of our own sbt plugins. while trying to upgrade our own plugin to sbt 1.0 we found that sbt-git is not published for 1.0 yet. are there any plans to do so?
Philipp Hoffmann
@philipphoffmann
oh wait, i might have just figured that what i said is not true :D
Igal Benardete
@igalbenardete
Is there a way to get the current branch and the base branch of a pull request using this plugin ?
Michael Rubin
@mrubin
I’m not able to get my sbt prompt to change with sbt-git (using sbt 1.1.2, sbt-git 1.0.0)
I’ve enabled GitVersioning and GitBranchPrompt
I’m returning Some(“foo”) from git.gitTagToVersionNumber
I expect my prompt to change, but it does not
Michael Rubin
@mrubin
Can anyone help with sbt/sbt-git#161 ?
Ivano Pagano
@ivanopagano
hello everyone, dumb question, what's the most common way to use the plugin to run git commands from within other build tasks?