Skip to content

Cannot delete branches with slashes in the name. #4089

@erenfro

Description

@erenfro
  • Gogs version (or commit ref): 0.9.113.1223
  • Git version: 1.8.3.1
  • Operating system: CentOS 7.3.1611
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • SQLite
  • Can you reproduce the bug at https://try.gogs.io:
  • Log gist:
    xorm.log:
    [xorm] [info] 2017/02/06 01:10:55.904407 [sql] SELECT id, lower_name, name, full_name, email, passwd, login_type, login_source, login_name, type, location, website, rands, salt, created_unix, updated_unix, last_repo_visibility, max_repo_creation, is_active, is_admin, allow_git_hook, allow_import_local, prohibit_login, avatar, avatar_email, use_custom_avatar, num_followers, num_following, num_stars, num_repos, description, num_teams, num_members FROM user WHERE id=? LIMIT 1 [args] [1]
    [xorm] [info] 2017/02/06 01:10:55.905125 [sql] SELECT id, lower_name, name, full_name, email, passwd, login_type, login_source, login_name, type, location, website, rands, salt, created_unix, updated_unix, last_repo_visibility, max_repo_creation, is_active, is_admin, allow_git_hook, allow_import_local, prohibit_login, avatar, avatar_email, use_custom_avatar, num_followers, num_following, num_stars, num_repos, description, num_teams, num_members FROM user WHERE id=? LIMIT 1 [args] [1]
    [xorm] [info] 2017/02/06 01:10:55.905787 [sql] SELECT id, lower_name, name, full_name, email, passwd, login_type, login_source, login_name, type, location, website, rands, salt, created_unix, updated_unix, last_repo_visibility, max_repo_creation, is_active, is_admin, allow_git_hook, allow_import_local, prohibit_login, avatar, avatar_email, use_custom_avatar, num_followers, num_following, num_stars, num_repos, description, num_teams, num_members FROM user WHERE lower_name=? LIMIT 1 [args] [linux-help]
    [xorm] [info] 2017/02/06 01:10:55.906493 [sql] SELECT id, owner_id, lower_name, name, description, website, default_branch, num_watches, num_stars, num_forks, num_issues, num_closed_issues, num_pulls, num_closed_pulls, num_milestones, num_closed_milestones, is_private, is_bare, is_mirror, enable_wiki, enable_external_wiki, external_wiki_url, enable_issues, enable_external_tracker, external_tracker_format, external_tracker_style, enable_pulls, is_fork, fork_id, created_unix, updated_unix FROM repository WHERE owner_id=? AND lower_name=? LIMIT 1 [args] [2 cookbook-yum-zabbix]
    [xorm] [info] 2017/02/06 01:10:55.907067 [sql] SELECT id, lower_name, name, full_name, email, passwd, login_type, login_source, login_name, type, location, website, rands, salt, created_unix, updated_unix, last_repo_visibility, max_repo_creation, is_active, is_admin, allow_git_hook, allow_import_local, prohibit_login, avatar, avatar_email, use_custom_avatar, num_followers, num_following, num_stars, num_repos, description, num_teams, num_members FROM user WHERE lower_name=? LIMIT 1 [args] [psi-jack]
    [xorm] [info] 2017/02/06 01:10:55.954675 [sql] SELECT id, user_id, repo_id, mode FROM access WHERE user_id=? AND repo_id=? LIMIT 1 [args] [1 29]

Description

When a branch has slashes in the name, much like is often used in Agile-style development branching, after merging a branch and trying to use the delete branch option, it gives a HTTP-style authentication request and then a 404 error after supplying credentials.

In my test case scenario on try.gogs, I updated my master branch and my task/erenfro/remove-yum-cookbook branch, merged it to master, then tried to delete it, and the same thing occurred.

Often this is used for various types of tracking of the development workflow, such as:

bug/${developer}/${issuenumber}-description-of-work
task/${developer}/${issuenumber}-description-of-work
feature/${developer}/${issuenumber}-description-of-work
etc...

Metadata

Metadata

Assignees

Labels

💊 bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions