fix: get_repo_url() strips user/org from path (issue #181) #182
Reference in New Issue
Block a user
Delete Branch "fix/issue-181-get-repo-url-strips-user-org"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
get_repo_url()inkugetsu-worktree.shwhere the sed pattern was removing everything up to the LAST slash instead of the FIRST slashgit.fbrns.co/shoko/kugetsu#158:https://git.fbrns.co/kugetsu.git(WRONG)https://git.fbrns.co/shoko/kugetsu.git(CORRECT)test-git-url-parsing.shcovering all git URL parsing functionsChanges
kugetsu-worktree.sh:44): Changedsed 's/.*\///'tosed 's/^[^\/]*\///'test-git-url-parsing.sh): New test file with 22 test cases for URL parsingTest Coverage
get_repo_url()- constructs repo URLs from issue refsissue_ref_to_worktree_name()- converts issue ref to worktree directory nameissue_ref_to_branch_name()- converts issue ref to branch nameextract_issue_ref_from_message()- extracts issue refs from messages/URLsvalidate_issue_ref()- validates issue ref formatissue_ref_to_filename()/filename_to_issue_ref()- bidirectional conversionlgtm