Push success but display an error log #418

Closed
opened 2025-11-02 03:22:44 -06:00 by GiteaMirror · 19 comments
Owner

Originally created by @lunny on GitHub (Mar 3, 2017).

Don't know how to reproduce that, maybe some special commit message and I'm finding it.

core git:(master) git push origin master
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 1.83 KiB | 0 bytes/s, done.
Total 4 (delta 1), reused 0 (delta 0)
remote: 2017/03/03 22:17:40 [...tea/models/update.go:147 PushUpdate()] [E] updateIssuesCommit: No issue number specified
To http://192.168.0.103:3000/lunny/core.git
   8e2e75f..c0ba85e  master -> master
Originally created by @lunny on GitHub (Mar 3, 2017). Don't know how to reproduce that, maybe some special commit message and I'm finding it. ``` core git:(master) git push origin master Counting objects: 4, done. Delta compression using up to 4 threads. Compressing objects: 100% (4/4), done. Writing objects: 100% (4/4), 1.83 KiB | 0 bytes/s, done. Total 4 (delta 1), reused 0 (delta 0) remote: 2017/03/03 22:17:40 [...tea/models/update.go:147 PushUpdate()] [E] updateIssuesCommit: No issue number specified To http://192.168.0.103:3000/lunny/core.git 8e2e75f..c0ba85e master -> master ```
GiteaMirror added the type/bug label 2025-11-02 03:22:44 -06:00
Author
Owner

@tboerger commented on GitHub (Mar 4, 2017):

Maybe some fixes #number message?

@tboerger commented on GitHub (Mar 4, 2017): Maybe some fixes #number message?
Author
Owner

@lunny commented on GitHub (Mar 4, 2017):

Maybe, but I have tried many times, cannot reproduce it. Confusing.

@lunny commented on GitHub (Mar 4, 2017): Maybe, but I have tried many times, cannot reproduce it. Confusing.
Author
Owner

@lunny commented on GitHub (Mar 6, 2017):

Move this to v1.1 since cannot reproduce.

@lunny commented on GitHub (Mar 6, 2017): Move this to v1.1 since cannot reproduce.
Author
Owner

@willemvd commented on GitHub (Mar 13, 2017):

Just happened to me after pushing with --mirror from a bare repository on my machine to a brand new repo on a brand new installing of docker 1.1.0

@willemvd commented on GitHub (Mar 13, 2017): Just happened to me after pushing with --mirror from a bare repository on my machine to a brand new repo on a brand new installing of docker 1.1.0
Author
Owner

@mjwwit commented on GitHub (Mar 13, 2017):

Just happened here as well after pushing with --follow-tags. At first I thought it was because of a commit message, but after reading these comments it seems it is totally random...

@mjwwit commented on GitHub (Mar 13, 2017): Just happened here as well after pushing with `--follow-tags`. At first I thought it was because of a commit message, but after reading these comments it seems it is totally random...
Author
Owner

@pmattern commented on GitHub (Mar 15, 2017):

At least to some degree the problem seems to depend on some property of the repository in question. I can reproduce 100% here with 03d79983 and github.com/palinek/nm-tray on an Arch Linux as follows:

  • Install a Gitea instance from scratch. Minimal handling, so no further tweaking after the installer is finished.
  • Have an arbitrary non-administrative user create a repository "nm-tray" in his own account (so not belonging to some other organization).
  • Have the user clone the repository on the command line git clone https://github.com/palinek/nm-tray.git
  • Add the Gitea instance as additional remote git remote add foo http://<HTTP URL as provided by the Gitea UI>.
  • Have the user populate the repository by running git push -u foo master when it was not initialized by Gitea or git push --force foo master when it was.
@pmattern commented on GitHub (Mar 15, 2017): At least to some degree the problem seems to depend on some property of the repository in question. I can reproduce 100% here with 03d79983 and [github.com/palinek/nm-tray](https://github.com/palinek/nm-tray) on an Arch Linux as follows: * Install a Gitea instance from scratch. Minimal handling, so no further tweaking after the installer is finished. * Have an arbitrary non-administrative user create a repository "nm-tray" in his own account (so not belonging to some other organization). * Have the user clone the repository on the command line `git clone https://github.com/palinek/nm-tray.git` * Add the Gitea instance as additional remote `git remote add foo http://<HTTP URL as provided by the Gitea UI>`. * Have the user populate the repository by running `git push -u foo master` when it was not initialized by Gitea or `git push --force foo master` when it was.
Author
Owner

@pmattern commented on GitHub (Mar 17, 2017):

Indeed the problem does not seem to be fully solved yet. Running 0693fbfc I cannot see it any longer with nm-tray (and a bunch of others either), but it still exists in FeatherNotes or lxqt-session, same steps as in my previous comment.

EDIT Add another repository that's still affected.

@pmattern commented on GitHub (Mar 17, 2017): Indeed the problem does not seem to be fully solved yet. Running 0693fbfc I cannot see it any longer with [nm-tray](https://github.com/palinek/nm-tray) (and a bunch of others either), but it still exists in [FeatherNotes](https://github.com/tsujan/FeatherNotes) or [lxqt-session](https://github.com/lxde/lxqt-session), same steps as in my previous comment. EDIT Add another repository that's still affected.
Author
Owner

@lunny commented on GitHub (Mar 17, 2017):

@pmattern I see so I reopened it. #1220 did not resolve it completely.

@lunny commented on GitHub (Mar 17, 2017): @pmattern I see so I reopened it. #1220 did not resolve it completely.
Author
Owner

@agrn commented on GitHub (Mar 26, 2017):

I reproduced it several times with --all on one specific repository, even though there is no issue at all on that repo. I use --all on one other repo, with several issues, without problems. I never saw that error before I upgraded to 1.1.

@agrn commented on GitHub (Mar 26, 2017): I reproduced it several times with `--all` on one specific repository, even though there is no issue at all on that repo. I use `--all` on one other repo, with several issues, without problems. I never saw that error before I upgraded to 1.1.
Author
Owner

@agrn commented on GitHub (Mar 27, 2017):

Hmm, it looks like a regexp error. The error "No issue number specified" is stored in a variable called errMissingIssueNumber. It is only used once in GetIssueByRef(). This function is called 3 times in UpdateIssuesCommit(). This function is called by CommitRepoAction(), then by PushUpdate(), which logs the aforementioned error. Its purpose seems to update issue status when an issue is mentioned in a commit message, and uses 3 regexp for this purpose. One for matching all reference mention, one when the commit message says something along "close issue", and the last for "reopen issue".

The first regex matches the following commit message:

Merge branch 'stable/0.7.z' into prod/pa1ch/0.7.z

Gitea then thinks that 'stable/0.7 and prod/pa1ch/0.7 are issue ids.

The regex used by UpdateIssuesCommit() to find issue reference ((?i)(?:)(^| )\S+) doesn't seem to work as expected.

@agrn commented on GitHub (Mar 27, 2017): Hmm, it looks like a regexp error. The error "No issue number specified" is stored in a variable called [`errMissingIssueNumber`](https://github.com/go-gitea/gitea/blob/1d652913425c5e296d60e6ee268a2c1f59a3379a/models/issue.go#L26). It is only used once in [`GetIssueByRef()`](https://github.com/go-gitea/gitea/blob/1d652913425c5e296d60e6ee268a2c1f59a3379a/models/issue.go#L950). This function is called 3 times in [`UpdateIssuesCommit()`](https://github.com/go-gitea/gitea/blob/1d652913425c5e296d60e6ee268a2c1f59a3379a/models/action.go#L338). This function is called by [`CommitRepoAction()`](https://github.com/go-gitea/gitea/blob/3cf0e513e68509558e135cfaea5cdc8fecc7f7c5/models/action.go#L477), then by [`PushUpdate()`](https://github.com/go-gitea/gitea/blob/cd1821a7e292b05e04fcc2a969b42d06ab512849/models/update.go#L68), which logs the aforementioned error. Its purpose seems to update issue status when an issue is mentioned in a commit message, and uses 3 regexp for this purpose. One for matching all reference mention, one when the commit message says something along "close issue", and the last for "reopen issue". The first regex matches the following commit message: > Merge branch 'stable/0.7.z' into prod/pa1ch/0.7.z Gitea then thinks that `'stable/0.7` and `prod/pa1ch/0.7` are issue ids. The regex used by `UpdateIssuesCommit()` to find issue reference (`(?i)(?:)(^| )\S+`) doesn't seem to work as expected.
Author
Owner

@agrn commented on GitHub (Mar 27, 2017):

I was working with a copy of 1.1.0 and didn't saw #1220, sorry. Anyway, I came up with a fix that looks like #1220, but on all of the three loops in UpdateIssuesCommit(), right here : agrn/gitea@b5aa7d98fc. I tried to reproduce pmattern's issues with FeatherNotes and lxqt-session, before and after applying theses modifications, and couldn't reproduce the issue with the patched version.

@agrn commented on GitHub (Mar 27, 2017): I was working with a copy of 1.1.0 and didn't saw #1220, sorry. Anyway, I came up with a fix that looks like #1220, but on all of the three loops in `UpdateIssuesCommit()`, right here : agrn/gitea@b5aa7d98fcf212404247ba25b03de0c7d0d8acce. I tried to reproduce pmattern's issues with FeatherNotes and lxqt-session, before and after applying theses modifications, and couldn't reproduce the issue with the patched version.
Author
Owner

@pmattern commented on GitHub (Mar 27, 2017):

On a side note some documentation how to install branches other than the default code.gitea.io/gitea, probably best at https://docs.gitea.io, wouldn't hurt.
So far I've always tried to run something like go get -d -u <some custom URL> in an attempt to keep all dependencies updated as well which resulted in error messages during installation sooner or later.

@pmattern commented on GitHub (Mar 27, 2017): On a side note some documentation how to install branches other than the default `code.gitea.io/gitea`, probably best at https://docs.gitea.io, wouldn't hurt. So far I've always tried to run something like `go get -d -u <some custom URL>` in an attempt to keep all dependencies updated as well which resulted in error messages during installation sooner or later.
Author
Owner

@mjwwit commented on GitHub (Apr 3, 2017):

I think this can be closed, as #1393 has been merged.

@mjwwit commented on GitHub (Apr 3, 2017): I think this can be closed, as #1393 has been merged.
Author
Owner

@RickZeeland commented on GitHub (May 1, 2017):

Sorry, but I'm still getting the error on Windows 10, with a Gitea 64 bits version downloaded last week.
The push seems to be successful though.
gitea clone migration 5

@RickZeeland commented on GitHub (May 1, 2017): Sorry, but I'm still getting the error on Windows 10, with a Gitea 64 bits version downloaded last week. The push seems to be successful though. ![gitea clone migration 5](https://cloud.githubusercontent.com/assets/22370505/25575493/4290e58c-2e58-11e7-975b-6e1e33af610f.png)
Author
Owner

@lunny commented on GitHub (May 1, 2017):

@RickZeeland which version did you download? This issue is resolved by #1393 which only in master branch

@lunny commented on GitHub (May 1, 2017): @RickZeeland which version did you download? This issue is resolved by #1393 which only in master branch
Author
Owner

@RickZeeland commented on GitHub (May 1, 2017):

Gitea version (or commit ref): 1.1.0+8-gd9bdf7aGit version: 2.11
Operating system: Windows 10 Enterprise
Database: PostgreSQL

@RickZeeland commented on GitHub (May 1, 2017): Gitea version (or commit ref): 1.1.0+8-gd9bdf7aGit version: 2.11 Operating system: Windows 10 Enterprise Database: PostgreSQL
Author
Owner

@beppler commented on GitHub (May 18, 2017):

I can push, but get some messages from server.
Gitea version: 1.1.1
Git version: 2.11.0
Operating system: Debian 8.8

gitea-push-message

@beppler commented on GitHub (May 18, 2017): I can push, but get some messages from server. Gitea version: 1.1.1 Git version: 2.11.0 Operating system: Debian 8.8 ![gitea-push-message](https://cloud.githubusercontent.com/assets/66092/26217267/25ce04a6-3bdd-11e7-88e3-d83d689f2a93.png)
Author
Owner

@agrn commented on GitHub (May 18, 2017):

Because the fix is only in the master branch right now

@agrn commented on GitHub (May 18, 2017): Because the fix is only in the master branch right now
Author
Owner

@lunny commented on GitHub (May 19, 2017):

So we need a back port to v1.1.2

@lunny commented on GitHub (May 19, 2017): So we need a back port to v1.1.2
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#418