Skip to content

getCommit() fails during parsing #10

@matthew-carroll

Description

@matthew-carroll

I'm running gitDir.getCommit() using a hash that comes from myBranch.sha. I get the following error:

Unhandled exception:
Bad state: No element
#0      Iterable.single (dart:core/iterable.dart:552:25)
#1      Commit._parse (package:git/src/commit.dart:56:53)
#2      Commit.parse (package:git/src/commit.dart:28:17)
#3      GitDir.getCommit (package:git/src/git_dir.dart:40:19)
<asynchronous suspension>

I ran the same command with the same hash from my terminal and didn't notice any issue, except that the final line of terminal output does not include a newline. Would that break getCommit()?

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