Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull requests don't work if branch name is 7 characters or longer #3743

Closed
2 of 6 tasks
samuelson opened this issue Oct 7, 2016 · 6 comments
Closed
2 of 6 tasks

Pull requests don't work if branch name is 7 characters or longer #3743

samuelson opened this issue Oct 7, 2016 · 6 comments

Comments

@samuelson
Copy link

samuelson commented Oct 7, 2016

Description

We'd like to use gogs for a Puppet control-repo. This usually means making the default branch "production" instead of "master".

It seems that any name beginning with the string "product" triggers this issue. When I use any other name for the base branch, the new Pull Request dialog shows drop down menus to select the branches. When I use "product", it doesn't show drop down menus and only shows links to the product branch.

Attempting to track this down, I tried some protected words from the code, and the word "present" also triggered the bug. I was able to repro with any branch name that is 7 characters or longer.

This is currently a blocker for us.

Edit: Narrowed down issue to branches 7 characters or longer

@samuelson samuelson changed the title Pull requests don't work if base branch is named "Production" Pull requests don't work if base branch is named "production" Oct 7, 2016
@samuelson samuelson changed the title Pull requests don't work if base branch is named "production" Pull requests don't work if base branch is named "product" Oct 7, 2016
@samuelson samuelson changed the title Pull requests don't work if base branch is named "product" Pull requests don't work if base branch name begins with "p" and is 7 characters or longer Oct 7, 2016
@samuelson
Copy link
Author

I suspect this is related to how the SHA's are shortened when comparing two commits instead of two branches.

@samuelson samuelson changed the title Pull requests don't work if base branch name begins with "p" and is 7 characters or longer Pull requests don't work if base branch name is 7 characters or longer Oct 7, 2016
@samuelson
Copy link
Author

samuelson commented Oct 7, 2016

I'm pretty sure this is the source of the problem:
7eafe32

#3418

@samuelson samuelson changed the title Pull requests don't work if base branch name is 7 characters or longer Pull requests don't work if branch name is 7 characters or longer Oct 7, 2016
@samuelson
Copy link
Author

Ok, it looks like it's any branch name that's 7 characters or longer not just the base.

Sorry to keep updating my own ticket, I'm trying to figure this out and I'm hoping someone who has a better understanding of this project will know how to fix it.

@samuelson
Copy link
Author

@unknwon that PR fixed it for me ^^ but I don't know enough about the project to know if that might break something else.

@thibaultmeyer
Copy link
Contributor

thibaultmeyer commented Oct 27, 2016

I test your PR too. you have change too many lines. Only lines 593 and 591 (see my review) must be fixed.

@unknwon
Copy link
Member

unknwon commented Dec 22, 2016

Fixed by #3851.

@unknwon unknwon closed this as completed Dec 22, 2016
Martchus pushed a commit to Martchus/gogs that referenced this issue Jun 7, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants