Skip to content

gitHeadCommitDate is wrapped in double quotes when useConsoleForROGit is true #372

Description

@mjustin

When useConsoleForROGit is true, the value of the gitHeadCommitDate key is surrounded by a pair of double quotes. When useConsoleForROGit is false, it is not.

Expected behavior

useConsoleForROGit is not wrapped in quotes, regardless of the value of useConsoleForROGit.

Actual behavior

useConsoleForROGit is wrapped in quotes when useConsoleForROGit is true, but not when useConsoleForROGit is false.

Example

import com.github.sbt.git.SbtGit.GitKeys.useConsoleForROGit

lazy val echoGit = taskKey[Unit]("echoGit")
echoGit := println(git.gitHeadCommitDate.value)

ThisBuild / useConsoleForROGit := true

With useConsoleForROGit := true:

$ sbt echoGit
Some("2026-06-01T17:23:26-05:00")

With useConsoleForROGit := false:

$ sbt echoGit
Some(2026-06-01T17:23:26-05:00)

P.S.

I checked some of the other values in com.github.sbt.git.SbtGit.GitKeys, and the one other that I noticed that was meaningfully different is gitHeadMessage, which had an extra newline at the end when useConsoleForROGit is true.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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