hakoerber / git-repo-manager

A git tool to manage worktrees and integrate with GitHub and GitLab
https://hakoerber.github.io/git-repo-manager/
GNU General Public License v3.0
62 stars 9 forks source link

catch the error returned by add_repo_status #44

Closed vrischmann closed 1 year ago

vrischmann commented 1 year ago

Hi, thanks for the tool ! I'm playing around with it to see if I can use it and I encountered a small issue:

If add_repo_status returns an error it will eventually be printed to the user but there won't be any repository information:

[✘] Error getting status: No branch checked out

This patch catches the error earlier so we can print the repository name:

[✘] Error: freebsd-src: Couldn't add repo status: No branch checked out

(ideally repos status wouldn't fail if there's no branch checked out but that's another story).

hakoerber commented 1 year ago

Hey, thank you the contribution!

I'm always happy to receive any feedback about grm. I'm mostly using it for my own workflow, which is quite "happy-path heavy". Error handling & messages are definitely one of the areas that need some work.

Merged as-is, thanks again.

Have a nice day!

EDIT: Let me know if you'd like to be added to the CONTRIBUTORS file.