Uploaded image for project: 'Skara'
  1. Skara
  2. SKARA-92

GitRepository::currentBranch fails when on a detached HEAD

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: libraries
    • Labels:
      None

      Description

      When in a detached HEAD state, e.g. by checking out a previous commit (e.g. git checkout HEAD~).

      When running `git webrev -r HEAD~ -N` again we see the following exception:

      $ git webrev -r HEAD~ -N
      Exception in thread "main" java.io.IOException: Unexpected exit code
      'git symbolic-ref --short HEAD' exited with status: 128
      [stdout]
      [stderr]
      > fatal: ref HEAD is not a symbolic ref
              at org.openjdk.skara.vcs/org.openjdk.skara.vcs.git.GitRepository.await(GitRepository.java:94)
              at org.openjdk.skara.vcs/org.openjdk.skara.vcs.git.GitRepository.currentBranch(GitRepository.java:666)
              at org.openjdk.skara.cli/org.openjdk.skara.cli.GitWebrev.main(GitWebrev.java:198)
              at org.openjdk.skara.cli/org.openjdk.skara.cli.GitSkara.main(GitSkara.java:130)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jvernee Jorn Vernee
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: