Unable to merge pull request #2806

Closed
opened 2025-11-02 04:49:07 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @ghost on GitHub (Jan 24, 2019).

  • Gitea version (or commit ref): 386e531
  • Git version: git version 2.20.1
  • Operating system: macOS
  • 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:
[...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

Originally created by @ghost on GitHub (Jan 24, 2019). - 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 <!-- **If this issue involves the Web Interface, please include a screenshot** -->
GiteaMirror added the type/bug label 2025-11-02 04:49:07 -06:00
Author
Owner

@typeless commented on GitHub (Jan 24, 2019):

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

oops, I confused the file path. sorry.

@typeless commented on GitHub (Jan 24, 2019): ~~@yasuokav Have you mixed up with other changes? The message should be at [L452](https://github.com/go-gitea/gitea/blob/386e5312a4830ae9f87d00d7d95c8c849d50a06f/models/pull.go#L452), not L589.~~ oops, I confused the file path. sorry.
Author
Owner

@typeless commented on GitHub (Jan 24, 2019):

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 386e5312a4/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.

@typeless commented on GitHub (Jan 24, 2019): 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.
Author
Owner

@ghost commented on GitHub (Jan 24, 2019):

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
@ghost commented on GitHub (Jan 24, 2019): > 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 ```
Author
Owner

@typeless commented on GitHub (Jan 24, 2019):

Ok, I'll submit a patch soon.

By the way, thanks your your testing & report.

@typeless commented on GitHub (Jan 24, 2019): Ok, I'll submit a patch soon. By the way, thanks your your testing & report.
Author
Owner

@typeless commented on GitHub (Jan 24, 2019):

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

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

@typeless commented on GitHub (Jan 24, 2019): @yasuokav https://github.com/go-gitea/gitea/pull/5825 If you can verify this PR, that would be nice.
Author
Owner

@ghost commented on GitHub (Jan 24, 2019):

@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
...
@ghost commented on GitHub (Jan 24, 2019): > @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 ... ```
Author
Owner

@typeless commented on GitHub (Jan 24, 2019):

My bad. I have updated the PR.

@typeless commented on GitHub (Jan 24, 2019): My bad. I have updated the PR.
Author
Owner

@ghost commented on GitHub (Jan 24, 2019):

@typeless This PR solves this problem! Thank you

@ghost commented on GitHub (Jan 24, 2019): @typeless This PR solves this problem! Thank you
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2806