Skip to content

Commit

Permalink
Merge pull request #56 from nuclearcat/fix-tot
Browse files Browse the repository at this point in the history
fix(checkout): Properly handle if we cannot retrieve tip of tree
  • Loading branch information
aliceinwire authored Dec 10, 2024
2 parents 46a699d + 6855788 commit 69e1aad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions kcidev/subcommands/checkout.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,11 @@ def checkout(
f"Retrieving latest commit on tree: {giturl} branch: {branch}", fg="green"
)
commit = retrieve_tot_commit(giturl, branch)
if not commit or len(commit) != 40:
click.secho(
"Unable to retrieve latest commit. Wrong tree/branch?", fg="red"
)
return
click.secho(f"Commit to checkout: {commit}", fg="green")
resp = send_checkout_full(
url,
Expand Down

0 comments on commit 69e1aad

Please sign in to comment.