nmattia / niv

Easy dependency management for Nix projects
https://github.com/nmattia/niv
MIT License
1.55k stars 77 forks source link

Clarify Git error on missing branch #294

Closed nmattia closed 3 years ago

nmattia commented 3 years ago

Whereas before niv would simply say that git didn't produce any output, it now points out that the branch may not exist:

*Niv> :main add git git@github.com:nmattia/niv -b foobar
Adding package niv
  FATAL: Could not read the output of 'git'.
  command: git ls-remote git@github.com:nmattia/niv refs/heads/foobar
  Git didn't produce any output. Does the branch 'foobar' exist?
  FATAL: One or more packages failed to update:
  niv: ExitFailure 1
ERROR: ExitFailure 1
*** Exception: ExitFailure 1

Closes #176