Gitea: Unable to merge pull request

Created on 24 Jan 2019  路  8Comments  路  Source: go-gitea/gitea

  • Gitea version (or commit ref): 386e531
  • Git version: git version 2.20.1
  • Operating system: macOS
  • Database (use [x]):

    • [ ] PostgreSQL

    • [x] MySQL

    • [ ] MSSQL

    • [ ] SQLite

  • Can you reproduce the bug at https://try.gitea.io:

    • [ ] Yes (provide example URL)

    • [ ] No

    • [x] Not relevant

  • Log gist:
[...routers/repo/pull.go:589 MergePullRequest()] [E] Merge: Writing sparse-checkout file to /Users/user/giteatmp/tmp/local-repo/merge-70720432.git/.git/info/sparse-checkout: open /Users/user/giteatmp/tmp/local-repo/merge-70720432.git/.git/info/sparse-checkout: no such file or directory

Description

Use squash merge style
@typeless

Screenshots

kinbug

All 8 comments

@yasuokav Have you mixed up with other changes?
The message should be at L452, not L589.

oops, I confused the file path. sorry.

I have no access to a MacOS machine for now.
But I have a conjecture that the info directory under .git might not exist under certain circumstances.

Can you comment out https://github.com/go-gitea/gitea/blob/386e5312a4830ae9f87d00d7d95c8c849d50a06f/models/pull.go#L399 and look into the path to verify that?

I can submit a patch to create .git/info, but it'd be better if we can make sure.

I have no access to a MacOS machine for now.
But I have a conjecture that the info directory under .git might not exist under certain circumstances.

Yes. I can confirm that.

ls

FETCH_HEAD  HEAD        config      hooks       logs        objects     packed-refs refs

Ok, I'll submit a patch soon.

By the way, thanks your your testing & report.

@yasuokav https://github.com/go-gitea/gitea/pull/5825

If you can verify this PR, that would be nice.

@yasuokav #5825

If you can verify this PR, that would be nice.

This PR will cause another problem.

[...routers/repo/pull.go:589 MergePullRequest()] [E] Merge: Writing sparse-checkout file to /Users/user/giteatmp/tmp/local-repo/merge-915998714.git/.git/info/sparse-checkout: open /Users/user/giteatmp/tmp/local-repo/merge-915998714.git/.git/info/sparse-checkout: permission denied
cd info
cd: permission denied: info

...
drwxr-xr-x  hooks
drw-------  info
drwxr-xr-x  logs
drwxr-xr-x  objects
...

My bad. I have updated the PR.

@typeless This PR solves this problem! Thank you

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tuxfanou picture tuxfanou  路  3Comments

mirhec picture mirhec  路  3Comments

BRMateus2 picture BRMateus2  路  3Comments

flozz picture flozz  路  3Comments

jonasfranz picture jonasfranz  路  3Comments