Skip to content

Error on getCurrentBranch() If No Branch is Checked Out #11

@tsteward

Description

@tsteward

Steps to reproduce

  1. Checkout a specific commit hash git checkout <commit hash>
  2. Call getCurrentBranch() on a GitDir instance.
  3. The following error occurs.

Error

RangeError: Value not in range: 11
#0      _StringBase.substring (dart:core/runtime/libstring_patch.dart:384:7)
#1      new BranchReference (package:git/src/branch_reference.dart:11:32)
#2      CommitReference.toBranchReference (package:git/src/commit_reference.dart:35:11)
#3      GitDir.getCurrentBranch (package:git/src/git_dir.dart:116:10)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions