-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
WIP: Move git as modules/git #5991
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
Update README.md
try to fix Duplicate of files in directory (gogs#2254 )
This fixes regression introduced in ebd9fb2, that GetSubModules was always returning empty submodule info because c.submoduleCache != nil check was always true since parseCommitData was setting commit.submoduleCache = newObjectCache() so it was always not-nil. Now we initialize submoduleCache in first GetSubModules call, next call will return cached entries.
This fixes GetCommitsInfo returning GetSubModule (/somemodule): object does not exist [id: , rel_path: .gitmodules] when /somemodule is a ref entry but no .gitmodules file is present. Instead failing we just check for IsErrNotExist and return empty submodule url. This also fixes HTTP 500 internal error in Gogs for case described above.
Fix submodule info loading
…o-gitea#113) * GetCommit() returns a ErrNotExist if short commit ID does not exists Currently, GetCommit() returns a generic error if a short commit ID does not exists in a repository. When a commit is not found by git-rev-parse, it returns an errors which contains "fatal: ambiguous argument". GetCommit() now search if the error contains this string, and, if it does, returns an ErrNotExist. The idea is to allow commits to be accessed from gitea with a short commit ID. Without this change, it would return a 500 Internal Server Error when a short ID does not exists in the repository. Signed-off-by: Alban Gruin <alban@pa1ch.fr> * GetCommit(): change the comparison for short commit messages `fatal: ambiguous argument` can be the beginning of two errors in git. This changes the comparison to something less ambiguous. Signed-off-by: Alban Gruin <alban@pa1ch.fr>
…ile and Gopkg.toml
Codecov Report
@@ Coverage Diff @@
## master #5991 +/- ##
==========================================
+ Coverage 38.72% 39.38% +0.65%
==========================================
Files 332 360 +28
Lines 48992 50816 +1824
==========================================
+ Hits 18973 20014 +1041
- Misses 27271 27939 +668
- Partials 2748 2863 +115
Continue to review full report at Codecov.
|
Hey @lunny I hope you don't mind that I took the liberty of getting this to build. I think there's still a few things left:
|
I looked a bit more at this earlier today, there are issues in terms of the tests and benchmarks of the git module. These will add files to modules/git directory by default - these aren't cleaned and as some are go files will then cause other make tasks to fail. They should probably be changed to download to a temporary directory which is deleted at the end of a test. |
@zeripath please feel free to submit your commits. This PR still needs many changes. |
They should already be there - I used my manager rights to push changes to your GitHub branch. If you pull from that locally you should get the changes. |
We don’t need to keep git history because 1. We will have it in old repo (and can archive that repo), and 2. When this is merged it’ll be squashed into one commit then merged. |
should fix #5954 |
Please go #6364 to discuss further. |
This will still keep all the git commit histories.