Back to Codeberg

don't compare schemes when checking if instances are the same #220

forgejo-contrib-forgejo-cli-pulls-220.md

latest10.4 KB
Original Source

forgejo-contrib/forgejo-cli

Watch20

Star402

Fork

You've already forked forgejo-cli

51

CodeIssues 44Pull requests 8Releases 11Packages 2WikiActivity

don't compare schemes when checking if instances are the same #220

Merged

Cyborusmerged 1 commit from fix-same-instance-detection into main 2025-09-21 21:58:37 +02:00

Conversation 4Commits 1Files changed 1 +7 -1

Cyborus commented 2025-09-21 21:48:41 +02:00

Member

Copy link

When the remote url was an SSH url, comparing it against a provided --host URL would fail, since their schemes differ. The schemes don't actually matter for determining if they're the same instance, so now it only compares the host name, port, and path.

When the remote url was an SSH url, comparing it against a provided --host URL would fail, since their schemes differ. The schemes don't actually matter for determining if they're the same instance, so now it only compares the host name, port, and path.

Cyborus added 1 commit 2025-09-21 21:48:41 +02:00

fix: don't compare schemes when checking if instances are the same

All checks were successful

ci/woodpecker/pr/check Pipeline was successful

Details

f8619e28ff

Cyborus commented 2025-09-21 21:49:43 +02:00

Author

Member

Copy link

@untitaker I was able to reproduce the problem you encountered, and this fixed it. Could you confirm it fixes it for you, too?

@untitaker I was able to reproduce the problem you encountered, and this fixed it. Could you confirm it fixes it for you, too?

untitaker commented 2025-09-21 21:50:29 +02:00

First-time contributor

Copy link

ah that fix makes more sense to me. let me check in a min

ah that fix makes more sense to me. let me check in a min

Cyborus commented 2025-09-21 21:54:12 +02:00

Author

Member

Copy link

I'm getting a nagging feeling that I'll need to rework the repo detection logic entirely, it's hard to wrap my head around it right now. That's for another PR, though.

I'm getting a nagging feeling that I'll need to rework the repo detection logic entirely, it's hard to wrap my head around it right now. That's for another PR, though.

untitaker commented 2025-09-21 21:56:43 +02:00

First-time contributor

Copy link

yeah i tried fixing it myself but i was very afraid because of the lack of test coverage. I think some integration tests that create real git repos in tmpdirs would help a lot, even if that testsuite is slow and flaky it would have helped.

the fix works! thank you

yeah i tried fixing it myself but i was very afraid because of the lack of test coverage. I think some integration tests that create real git repos in tmpdirs would help a lot, even if that testsuite is slow and flaky it would have helped. the fix works! thank you

👍 1

Cyborus merged commit a19193b333 into main 2025-09-21 21:58:37 +02:00

Cyborus deleted branch fix-same-instance-detection 2025-09-21 21:58:37 +02:00

Cyborus referenced this pull request from a commit 2025-09-21 21:58:39 +02:00 Merge pull request 'don't compare schemes when checking if instances are the same' (#220) from fix-same-instance-detection into main

Cyborus added this to the v0.4.0 milestone 2026-01-14 01:22:20 +01:00

Sign in to join this conversation.

Reviewers

No reviewers

Labels

Clear labels[ Kind/Breaking Breaking change that won't be backward compatible

](#)[ Kind/Bug Something is not working

](#)[ Kind/Design Discussion about UI/UX design

](#)[ Kind/Documentation Documentation changes

](#)[ Kind/Enhancement Improve existing functionality

](#)[ Kind/Feature New functionality

](#)[ Kind/Security This is security issue

](#)[ Kind/Testing Issue or pull request related to testing

](#)[ Kind/Upstream This is an issue with upstream software (Forgejo) that is probably not our fault

](#)

[ Priority

Critical The priority is critical

](#)[ Priority

High The priority is high

](#)[ Priority

Low The priority is low

](#)[ Priority

Medium The priority is medium

](#)

[ Reviewed

Confirmed Issue has been confirmed

](#)[ Reviewed

Duplicate This issue or pull request already exists

](#)[ Reviewed

Invalid Invalid issue

](#)[ Reviewed

Won't Fix This issue won't be fixed

](#)

[ Status

Abandoned Somebody has started to work on this but abandoned work

](#)[ Status

Blocked Something is blocking this issue or pull request

](#)[ Status

Need More Info Feedback is required to reproduce issue or to continue work

](#)

[ Suspicious

](#)

No labels Kind/Breaking Kind/Bug Kind/Design Kind/Documentation Kind/Enhancement Kind/Feature Kind/Security Kind/Testing Kind/Upstream [ Priority

Critical ](/forgejo-contrib/forgejo-cli/pulls?labels=173012) [ Priority

High ](/forgejo-contrib/forgejo-cli/pulls?labels=173013) [ Priority

Low ](/forgejo-contrib/forgejo-cli/pulls?labels=173015) [ Priority

Medium ](/forgejo-contrib/forgejo-cli/pulls?labels=173014) [ Reviewed

Confirmed ](/forgejo-contrib/forgejo-cli/pulls?labels=173007) [ Reviewed

Duplicate ](/forgejo-contrib/forgejo-cli/pulls?labels=173005) [ Reviewed

Invalid ](/forgejo-contrib/forgejo-cli/pulls?labels=173006) [ Reviewed

Won't Fix ](/forgejo-contrib/forgejo-cli/pulls?labels=173008) [ Status

Abandoned ](/forgejo-contrib/forgejo-cli/pulls?labels=173011) [ Status

Blocked ](/forgejo-contrib/forgejo-cli/pulls?labels=173010) [ Status

Need More Info ](/forgejo-contrib/forgejo-cli/pulls?labels=173009) Suspicious

Milestone

Clear milestone

No items

No milestone v0.4.0

Projects

Clear projects

No items

No project

Assignees

Clear assignees

No assignees

2 participants

Notifications Subscribe

Due date

The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference

forgejo-contrib/forgejo-cli!220

WritePreview

Loading…

Add table

| Rows | | | Columns | |

CancelOK

Add a link

Url Description Hint: With a URL in your clipboard, you can paste directly into the editor to create a link.

CancelOK

CancelSave

Reference in a new issue

Repository

forgejo-contrib/forgejo-cli

Title

Body

Create issue

No description provided.

Delete branch "fix-same-instance-detection"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?

No Yes