aboutsummaryrefslogtreecommitdiffstats
path: root/modules/git
Commit message (Collapse)AuthorAgeFilesLines
...
* Git statistics in Activity tab (#4724)Lauris BH2019-05-042-0/+143
| | | | | | | | | | | | | | | | | | * Initial implementation for git statistics in Activity tab * Create top user by commit count endpoint * Add UI and update src-d/go-git dependency * Add coloring * Fix typo * Move git activity stats data extraction to git module * Fix message * Add git code stats test
* Fix #6813: Allow git.GetTree to take both commit and tree names (#6816)Filip Navara2019-05-023-10/+16
| | | | | | | | | | * Allow git.GetTree to take both commit and tree names, return full paths on entries listed through Tree.ListEntriesRecursive Signed-off-by: Filip Navara <filip.navara@gmail.com> * Fix the SHA returned on Git Tree APIs called with commit hash or symbolic name Signed-off-by: Filip Navara <filip.navara@gmail.com>
* Remove `seen` map from `getLastCommitForPaths` (#6807)Filip Navara2019-04-301-8/+2
| | | | | | | | | Ensures correctly traversing the commit graph for all path and avoids erroneously skipping some. Also preallocate some arrays to correct size to prevent unnecessary reallocations. Fixes #6708. Signed-off-by: Filip Navara <filip.navara@gmail.com>
* Fix one performance/correctness regression in #6478 found on Rails ↵Filip Navara2019-04-211-38/+33
| | | | | | | | | | | | | | | | repository. (#6686) * Fix flaw in the commit history lookup that caused unnecessary traversal when the repository contains a lot of merge commits. Also return the merge commit as the changed one if the file or directory was changed as part of the merge, eg. through conflict resolution. Signed-off-by: Filip Navara <filip.navara@gmail.com> * Perform history simplification. If a file is present on multiple parents in a merge commit follow only the first parent.
* Improve listing performance by using go-git (#6478)Filip Navara2019-04-1921-634/+661
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use go-git for tree reading and commit info lookup. Signed-off-by: Filip Navara <navara@emclient.com> * Use TreeEntry.IsRegular() instead of ObjectType that was removed. Signed-off-by: Filip Navara <navara@emclient.com> * Use the treePath to optimize commit info search. Signed-off-by: Filip Navara <navara@emclient.com> * Extract the latest commit at treePath along with the other commits. Signed-off-by: Filip Navara <navara@emclient.com> * Fix listing commit info for a directory that was created in one commit and never modified after. Signed-off-by: Filip Navara <navara@emclient.com> * Avoid nearly all external 'git' invocations when doing directory listing (.editorconfig code path is still hit). Signed-off-by: Filip Navara <navara@emclient.com> * Use go-git for reading blobs. Signed-off-by: Filip Navara <navara@emclient.com> * Make SHA1 type alias for plumbing.Hash in go-git. Signed-off-by: Filip Navara <navara@emclient.com> * Make Signature type alias for object.Signature in go-git. Signed-off-by: Filip Navara <navara@emclient.com> * Fix GetCommitsInfo for repository with only one commit. Signed-off-by: Filip Navara <navara@emclient.com> * Fix PGP signature verification. Signed-off-by: Filip Navara <navara@emclient.com> * Fix issues with walking commit graph across merges. Signed-off-by: Filip Navara <navara@emclient.com> * Fix typo in condition. Signed-off-by: Filip Navara <navara@emclient.com> * Speed up loading branch list by keeping the repository reference (and thus all the loaded packfile indexes). Signed-off-by: Filip Navara <navara@emclient.com> * Fix lising submodules. Signed-off-by: Filip Navara <navara@emclient.com> * Fix build Signed-off-by: Filip Navara <navara@emclient.com> * Add back commit cache because of name-rev Signed-off-by: Filip Navara <navara@emclient.com> * Fix tests Signed-off-by: Filip Navara <navara@emclient.com> * Fix code style * Fix spelling * Address PR feedback Signed-off-by: Filip Navara <navara@emclient.com> * Update vendor module list Signed-off-by: Filip Navara <navara@emclient.com> * Fix getting trees by commit id Signed-off-by: Filip Navara <navara@emclient.com> * Fix remaining unit test failures * Fix GetTreeBySHA * Avoid running `git name-rev` if not necessary Signed-off-by: Filip Navara <navara@emclient.com> * Move Branch code to git module * Clean up GPG signature verification and fix it for tagged commits * Address PR feedback (import formatting, copyright headers) * Make blob lookup by SHA working * Update tests to use public API * Allow getting content from any type of object through the blob interface * Change test to actually expect the object content that is in the GIT repository * Change one more test to actually expect the object content that is in the GIT repository * Add comments
* Fixes 4762 - Content API for Creating, Updating, Deleting Files (#6314)Richard Mahn2019-04-173-2/+46
|
* Pre-calculate the absolute path of git (#6575)Mura Li2019-04-172-1/+12
| | | | | | | | * Pre-caculate the absolute path of git * Do not repeat string literals which has been defined somewhere Also make it flexible to accept customized/user-defined value.
* Support search operators for commits search (#6479)Mura Li2019-04-122-5/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Support searching commits with prefix syntax For now, support auther: committer: When more than one prefix is supplied is presented, the result is the union. When different prefixes are supplied, the result is the intersection. For example, "author:alice author:bob" => the result is all commits authored by Alice OR Bob "hello committer:alice" => the result is all commits committed by Alice AND has the keyword 'hello' in the message. Note that there should NOT have any space after the colon(:) of the prefix. For example, "author:bill" => correct "author: bill" => wrong * Remove unneeded logging * Add missing files of test repository * Add missing repo_unit entries to test fixtures * Update test cases * Add tooltip for commits search button * Update tooltip text I have no idea about how to format it with line breaks. * Make the usage example more real * Add a test case * Add new options struct for SearchCommits * Prefer len(s) > 0 over s != "" * Add NewSearchCommitsOptions
* Prevent server 500 on compare branches with no common history (#6555)zeripath2019-04-091-11/+16
| | | | | * Prevent 500 if there is no common mergebase * Prevent creation of PR with no history
* move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364)Lunny Xiao2019-03-2797-0/+4637
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * move code.gitea.io/git to code.gitea.io/gitea/modules/git * fix imports * fix fmt * fix misspell * remove wrong tests data * fix unit tests * fix tests * fix tests * fix tests * fix tests * fix tests * enable Debug to trace the failure tests * fix tests * fix tests * fix tests * fix tests * fix tests * comment commit count tests since git clone depth is 50 * fix tests * update from code.gitea.io/git * revert change to makefile
* move out git module and #1573 send push hookUnknwon2015-12-0922-1869/+0
|
* Allow pre-receive hook customizationAdam Strzelecki2015-12-081-0/+1
| | | | | | | This hook can be used for example to reject too large commits and it is executed before "update" hook, used exclusively by Gogs to update its state. https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
* #2008 more supported git hooksUnknwon2015-11-241-3/+11
|
* fix #1383Unknwon2015-11-201-0/+3
|
* better escape char handleUnknwon2015-11-201-9/+9
|
* fix #1119 and data race in timming tasksUnknwon2015-11-201-2/+23
|
* Merge pull request #1994 from arthuroy/developUnknwon2015-11-181-0/+5
|\ | | | | Fix #1965 - the hyperlink and the display name of the branch
| * Use refStr[len("refs/heads/"):] instead of refStr[11:] and fix errorArthur Ouyang2015-11-191-1/+1
| | | | | | | | Fix #1965
| * Use refStr[11:] instead of TrimPrefixArthur Ouyang2015-11-191-1/+2
| | | | | | | | Fix #1965
| * Fix #1965 - the hyperlink and the display name of the branchArthur Ouyang2015-11-191-0/+4
| | | | | | | | The hyperlink and the display name of the branch if the branch is in a folder or the branch name has '#'
* | #1742 Update default branch in git repository while change in web viewUnknwon2015-11-182-0/+35
|/
* #1922 Pull request fail to merge with BINUnknwon2015-11-161-1/+1
|
* rename fieldsUnknwon2015-11-0313-34/+55
|
* #1838 update merge base before generate new patchUnknwon2015-11-031-13/+37
|
* fix workaround for reverse proxy, ssh, submoduleMatthias Pioch2015-10-241-3/+4
|
* workaround for reverse proxy, ssh, submoduleMatthias Pioch2015-10-241-2/+8
|
* work on #1830Unknwon2015-10-231-5/+4
|
* print out git versionUnknwon2015-10-131-0/+5
|
* save PR info as patch and minor fix on PRUnknwon2015-10-041-15/+3
|
* basic PR featureUnknwon2015-09-022-9/+56
|
* finish PR UIUnknwon2015-09-021-0/+28
|
* work on PR conversationUnknwon2015-09-011-0/+86
|
* more clear errorUnknwon2015-08-281-2/+1
|
* new repo git hooks UIUnknwon2015-08-261-1/+6
|
* new commits tableUnknwon2015-08-201-1/+3
|
* fix #966Unknwon2015-08-201-0/+7
|
* list view: issue, label, milestoneUnknwon2015-08-091-9/+9
|
* fix #1169Unknwon2015-07-262-1/+9
| | | | - prevent create reop on existed path
* Handle submodules without a .gitmodules entry - fix #1023Filippo Valsorda2015-03-102-2/+6
|
* modules/git/signature.go: parse date foramt #663Unknwon2015-03-061-1/+1
|
* modules/git: able to parse RFC1123Z date format #663Unknwon2015-02-211-9/+20
|
* Fix diff css style, hooks \r charUnknwon2014-10-111-1/+1
|
* Fix #264Unknwon2014-10-062-0/+132
|
* If git >= 2.0, sort tags in descending order by version numberLinquize2014-10-052-0/+16
|
* Fix #515Unknwon2014-09-303-4/+7
|
* Fix #495 and cannot view repository by tagUnknwon2014-09-231-0/+1
|
* Add basic submodule supportUnknwon2014-09-221-0/+52
|
* submodule support and closed #478lunnyxiao2014-09-221-1/+1
|
* add submodule basic support & buf fixed #478lunnyxiao2014-09-224-1/+61
|
* Quick fix on #476Unknwon2014-09-161-1/+1
|