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

CountDivergingCommits: exit status 128 - fatal: ambiguous argument 'master..5297-allows-unicode': unknown revision or path not in the working tree. #7664

Closed
2 of 7 tasks
Alir3z4 opened this issue Jul 29, 2019 · 13 comments

Comments

@Alir3z4
Copy link

Alir3z4 commented Jul 29, 2019

  • Gitea version (or commit ref): 1.9.0+rc2-16-gd789170e3 built with GNU Make 4.1, go1.12.7 : bindata, sqlite, sqlite_unlock_notify
  • Git version: 2.7.4
  • Operating system: Ubuntu 16.04 LTS
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:
2019/07/29 14:14:12 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT "id", "user_id", "repo_id" FROM "watch" WHERE "user_id"=$1 AND "repo_id"=$2 LIMIT 1 []interface {}{1, 90}
2019/07/29 14:14:12 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT "id", "uid", "repo_id" FROM "star" WHERE "uid"=$1 AND "repo_id"=$2 LIMIT 1 []interface {}{1, 90}
2019/07/29 14:14:12 ...orm/session_exist.go:89:Exist() [I] [SQL] SELECT "id", "repo_id", "branch_name", "can_push", "enable_whitelist", "whitelist_user_i_ds", "whitelist_team_i_ds", "enable_merge_whitelist", "merge_whitelist_user_i_ds", "merge_whitelist_team_i_ds", "approvals_whitelist_user_i_ds", "approvals_whitelist_team_i_ds", "required_approvals", "created_unix", "updated_unix" FROM "protected_branch" WHERE "repo_id"=$1 AND "branch_name"=$2 LIMIT 1 []interface {}{90, "5297-allows-unicode"}
2019/07/29 14:14:12 ...uters/repo/branch.go:182:loadBranches() [E] CountDivergingCommits: exit status 128 - fatal: ambiguous argument 'master..5297-allows-unicode': unknown revision or path not in the working tree.
        Use '--' to separate paths from revisions, like this:
        'git <command> [<revision>...] -- [<file>...]'

2019/07/29 14:14:12 ...c/net/http/server.go:3012:logf() [I] http: superfluous response.WriteHeader call from code.gitea.io/gitea/vendor/gopkg.in/macaron%2ev1.(*responseWriter).WriteHeader (response_writer.go:59)

Description

Tried to open a repository branches page and faced the 500 error.

You can visit the URL as see the issue https://gitfoo.com/Alir3z4/django-cms/branches/

...

Screenshots

image

@zeripath
Copy link
Contributor

This is very likely the same issue as your other report. The master branch is not in the correct place therefore it can't be found

@zeripath
Copy link
Contributor

This is very likely the same issue as your other report. The master branch is not in the correct place therefore it can't be found

@zeripath zeripath reopened this Jul 29, 2019
@Alir3z4
Copy link
Author

Alir3z4 commented Jul 29, 2019

Correct, but how can be prevented from happening again ?
The repo has been migrated via migration interface.

@lunny
Copy link
Member

lunny commented Jul 29, 2019

Have you checked the filesystem permissions?

@Alir3z4
Copy link
Author

Alir3z4 commented Jul 29, 2019

Yep, they're all correctly set as the user that runs the gitea git:git

ls -la .../gitea/gitea-repositories/alir3z4/django-cms.git/
total 52
drwxr-xr-x  7 git git 4096 Jul 29 14:03 .
drwxr-x--- 74 git git 4096 Jul 29 13:22 ..
drwxr-xr-x  2 git git 4096 Jul 28 17:24 branches
-rw-r--r--  1 git git   66 Jul 28 17:25 config
-rw-r--r--  1 git git   73 Jul 28 17:24 description
-rw-r--r--  1 git git   30 Jul 28 17:25 HEAD
drwxr-xr-x  5 git git 4096 Jul 28 17:25 hooks
drwxr-xr-x  2 git git 4096 Jul 29 14:03 info
drwxr-xr-x  4 git git 4096 Jul 28 17:24 objects
-rw-r--r--  1 git git 8345 Jul 29 14:03 packed-refs
drwxr-xr-x  4 git git 4096 Jul 28 17:24 refs

@zeripath
Copy link
Contributor

I suspect you're pushing to that repository without going through Gitea. How are you pushing?

@Alir3z4
Copy link
Author

Alir3z4 commented Jul 29, 2019

I have not pushed to this repo in anyway, I've just migrated it over from github.

I cloned, pushed, deleted etc other repos on Gitea and all works fine.

@lunny
Copy link
Member

lunny commented Jul 29, 2019

So maybe some migrated branches broken the page?

@lunny
Copy link
Member

lunny commented Jul 29, 2019

The branch 5297-allows-unicode has no commit base with master.

@zeripath
Copy link
Contributor

Might this be an issue similar to #7610 whereby in 1.9 it appears that the default branch isn't updated properly - however I think on try this doesn't happen?

@Alir3z4
Copy link
Author

Alir3z4 commented Jul 29, 2019

IMO what is more important here, is how and why such thing has happened and how it can be prevented from happening again, because the problem has not happened via any custom or unofficial way, the repo has been migrated via the Gitea migration interface.

@stale
Copy link

stale bot commented Sep 27, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label Sep 27, 2019
@stale
Copy link

stale bot commented Oct 11, 2019

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale stale bot closed this as completed Oct 11, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants