strip all trailing slashes from work tree path, not just first one
diff --git a/got/got.c b/got/got.c
index d699079..d478002 100644
--- a/got/got.c
+++ b/got/got.c
@@ -381,7 +381,7 @@ cmd_checkout(int argc, char *argv[])
} else
usage_checkout();
- if (worktree_path[x = strlen(worktree_path) - 1] == '/')
+ while (worktree_path[x = strlen(worktree_path) - 1] == '/')
worktree_path[x] = '\0';
error = got_repo_open(&repo, repo_path);