-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Fix no empty input check in newSignatureFromCommitline for gogit version #28849
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
Can you add some tests? |
How to add test in both nogit and gogit version? 🤔 |
Have you tested Linux kernal? |
It seems you have to change them twice at the moment. |
Yes. It works well. |
A copy from |
You can copy first and then try to extract a function |
@@ -21,38 +21,59 @@ type Signature = object.Signature | |||
// Helper to get a signature from the commit line, which looks like these: | |||
// | |||
// author Patrick Gundlach <[email protected]> 1378823654 +0200 | |||
// author Patrick Gundlach <[email protected]> Thu, 07 Apr 2005 22:13:13 +0200 | |||
// author Patrick Gundlach <[email protected]> Thu Apr 07 22:13:13 2005 +0200 |
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.
@yp05327 after reading the code again, I think we should rewrite the code (for both gogit and nogogit). If you don't mind, I could propose a new approach soon. |
Never mind. It seems that the old codes haven’t been finished yet. So let’s finish it. |
-> Refactor parseSignatureFromCommitLine #29054 |
Replace go-gitea#28849. Thanks to @yp05327 for the looking into the problem. Fix go-gitea#28840 The old behavior of newSignatureFromCommitline is not right. The new parseSignatureFromCommitLine: 1. never fails 2. only accept one format (if there is any other, it could be easily added) And add some tests.
Replace go-gitea#28849. Thanks to @yp05327 for the looking into the problem. Fix go-gitea#28840 The old behavior of newSignatureFromCommitline is not right. The new parseSignatureFromCommitLine: 1. never fails 2. only accept one format (if there is any other, it could be easily added) And add some tests.
Replace go-gitea#28849. Thanks to @yp05327 for the looking into the problem. Fix go-gitea#28840 The old behavior of newSignatureFromCommitline is not right. The new parseSignatureFromCommitLine: 1. never fails 2. only accept one format (if there is any other, it could be easily added) And add some tests. (cherry picked from commit a24e1da)
Fix #28840
In signature_nogogit,go:

In signature_gogit.go:
