-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Fix missing reference prefix of commits when sync mirror repository #24868
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
Conversation
Related to Allow for matching short-hand references in sync pulls #23070 That PR has more comments |
I think it needs some tests, to show how parseRemoteUpdateOutput works. |
input: "From https://xxx.com/xxx/xxx\n - [deleted] (none) -> test/t2\n", | ||
results: []*mirrorSyncResult{ | ||
{ | ||
refName: "test/t2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it need prefix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so, but it seems impossible to parse out whether the current reference is a tag or a branch from the following text:
From https://xxx.com/xxx/xxx\n - [deleted] (none) -> v1.0.1\n
From https://xxx.com/xxx/xxx\n - [deleted] (none) -> test/t2\n
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then I think it needs to be commented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And the comment // delete branch
is not right, the example contains tags.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I did similar things in my refname PR
It seems like this PR could be merged already, but if there is any work needed in furtherance of that let me know. |
According to #23070 (comment) Let's take this PR for 1.19.4 ? |
…o-gitea#24994) replace go-gitea#24868 just a patch to fix go-gitea#24824 in v1.19.4 The reference name of commits when synchronizing should also has prefix like refs/heads/<branch-name>. (cherry picked from commit 826b7b9)
Fix #24824
The reference name of commits when synchronizing should also has prefix like
refs/heads/<branch-name>
.