Fix wrong detection of "repo in repo" check

Review Request #3792 — Created Jan. 30, 2025 and submitted

Information

grim/hgkeeper
default

Reviewers

Fix wrong detection of "repo in repo" check

If a repository "Dummy/RepoName-Something" exists
and we want to create "Dummy/RepoName" it was forbidden. So
let's add a / to avoid "contains" check.

This amends ebf8e3bd9e68.


 
Summary ID Author
Fix wrong detection of "repo in repo" check
If a repository "Dummy/RepoName-Something" exists and we want to create "Dummy/RepoName" it was forbidden. So let's add a / to avoid "contains" check. This amends ebf8e3bd9e68.
7e08fdb4d2cf86a5c26a8bfbefec3a268db35278 Andre Klitzing
Description From Last Updated

What happens if the user puts a / at the end of their repo name, does this end up with …

grimgrim
grim
  1. 
      
  2. access/repositories.go (Diff revision 1)
     
     
    Show all issues

    What happens if the user puts a / at the end of their repo name, does this end up with with // then?

    1. It will be filtered in NormalizeRepo with realRepoName := strings.Trim(strings.TrimPrefix(absPath, reposPath), "\\/")

    2. Awesome thanks, it's been awhile since I've been in here and couldn't remember how this works ;)

  3. 
      
grim
grim
grim
  1. Great work, thanks!!

  2. 
      
grim
Review request changed
Status:
Completed