summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/GitBlit.java
Commit message (Collapse)AuthorAgeFilesLines
* Git-LFS supportPaul Martin2015-10-101-2/+5
| | | | | | | | | | | | | | + Metadata maintained in append-only JSON file providing complete audit history. + Filestore menu item + Lists filestore items + Current size and availability + Link to GitBlit Filestore help page (top right) + Hooks into existing repository permissions + Uses default repository path for out-of-box operation with Git-LFS client + accessRestrictionFilter now has access to http method and auth header + Testing for servlet and manager
* Extract ticket service into an injectable object with a custom providerJames Moger2014-07-031-135/+5
|
* Implement custom IPublicKeyManager providerJames Moger2014-07-031-21/+5
|
* Annotate managers with @SingletonJames Moger2014-07-031-2/+3
|
* Extract services manager into a top-level injectable managerJames Moger2014-07-031-181/+0
|
* Use Guice annotations, not javax.inject annotationsJames Moger2014-07-031-1/+1
|
* Replace Dagger with Guice 4.0 beta and update Guava to 16.0.1James Moger2014-07-031-116/+24
|
* Embrace @Inject for Managers, Servlets, and FiltersJames Moger2014-07-031-0/+2
|
* Add clone transport user preferenceJames Moger2014-06-051-0/+19
|
* Add a basic SSH public key management UIJames Moger2014-06-051-0/+15
|
* Add TicketHook extensionJames Moger2014-04-121-0/+9
|
* Allow specifying accepted PUSH transportsJames Moger2014-04-101-0/+76
|
* Implement management commands in repositories dispatcherJames Moger2014-04-101-1/+1
|
* Refine delete user methodJames Moger2014-04-101-5/+2
|
* Delete ssh public keys when user is deletedJames Moger2014-04-101-0/+21
|
* Improve isServingRepositories checkJames Moger2014-04-101-0/+5
|
* Style: changed manager order to reflect dependency chainJames Moger2014-04-101-4/+4
| | | | Managers are mostly declared in dependency order. Managers with fewer dependencies are first. They are likely to be components of other managers. Also eliminated import artifacts from the cherry-pick.
* Add plugins/extension infrastructureDavid Ostrovsky2014-04-101-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Plugins are stored in `${baseFolder}/plugins` and are loaded during startup by the PluginManager. A plugin defines it's metadata in META-INF/MANIFEST.MF: Plugin-Class: com.gitblit.plugins.cookbook.CookbookPlugin Plugin-Dependencies: foo, bar Plugin-Id: gitblit-plugin Plugin-Provider: John Doe Plugin-Version: 1.0 Plugins can define extension points that can be implemented by other plugins and they can depend on other plugins: Plugin-Dependencies: foo, bar During the load phase, a directed acyclic graph is built and the loading order of the dependency chain is reversed using a topological sort; parent followed by children. The parent plugin classloader is the combined classloader of all parent plugins. Change-Id: I738821fa2bff02a5dbe339a944cc7e3c4dd8e299
* Elevate the public key manager to a top-level managerJames Moger2014-04-101-1/+4
|
* Fix incorrect displayed SSH transport permissionJames Moger2014-04-101-1/+1
|
* Display ssh clone urls in the repository url panelJames Moger2014-04-101-0/+10
|
* Ensure Lucene ticket index is updated on repository deletionJames Moger2014-03-271-2/+7
|
* Do not use @Inject on the ticket service constructorsJames Moger2014-03-061-1/+35
|
* Ticket tracker with patchset contributionsJames Moger2014-03-031-0/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A basic issue tracker styled as a hybrid of GitHub and BitBucket issues. You may attach commits to an existing ticket or you can push a single commit to create a *proposal* ticket. Tickets keep track of patchsets (one or more commits) and allow patchset rewriting (rebase, amend, squash) by detecing the non-fast-forward update and assigning a new patchset number to the new commits. Ticket tracker -------------- The ticket tracker stores tickets as an append-only journal of changes. The journals are deserialized and a ticket is built by applying the journal entries. Tickets are indexed using Apache Lucene and all queries and searches are executed against this Lucene index. There is one trade-off to this persistence design: user attributions are non-relational. What does that mean? Each journal entry stores the username of the author. If the username changes in the user service, the journal entry will not reflect that change because the values are hard-coded. Here are a few reasons/justifications for this design choice: 1. commit identifications (author, committer, tagger) are non-relational 2. maintains the KISS principle 3. your favorite text editor can still be your administration tool Persistence Choices ------------------- **FileTicketService**: stores journals on the filesystem **BranchTicketService**: stores journals on an orphan branch **RedisTicketService**: stores journals in a Redis key-value datastore It should be relatively straight-forward to develop other backends (MongoDB, etc) as long as the journal design is preserved. Pushing Commits --------------- Each push to a ticket is identified as a patchset revision. A patchset revision may add commits to the patchset (fast-forward) OR a patchset revision may rewrite history (rebase, squash, rebase+squash, or amend). Patchset authors should not be afraid to polish, revise, and rewrite their code before merging into the proposed branch. Gitblit will create one ref for each patchset. These refs are updated for fast-forward pushes or created for rewrites. They are formatted as `refs/tickets/{shard}/{id}/{patchset}`. The *shard* is the last two digits of the id. If the id < 10, prefix a 0. The *shard* is always two digits long. The shard's purpose is to ensure Gitblit doesn't exceed any filesystem directory limits for file creation. **Creating a Proposal Ticket** You may create a new change proposal ticket just by pushing a **single commit** to `refs/for/{branch}` where branch is the proposed integration branch OR `refs/for/new` or `refs/for/default` which both will use the default repository branch. git push origin HEAD:refs/for/new **Updating a Patchset** The safe way to update an existing patchset is to push to the patchset ref. git push origin HEAD:refs/heads/ticket/{id} This ensures you do not accidentally create a new patchset in the event that the patchset was updated after you last pulled. The not-so-safe way to update an existing patchset is to push using the magic ref. git push origin HEAD:refs/for/{id} This push ref will update an exisitng patchset OR create a new patchset if the update is non-fast-forward. **Rebasing, Squashing, Amending** Gitblit makes rebasing, squashing, and amending patchsets easy. Normally, pushing a non-fast-forward update would require rewind (RW+) repository permissions. Gitblit provides a magic ref which will allow ticket participants to rewrite a ticket patchset as long as the ticket is open. git push origin HEAD:refs/for/{id} Pushing changes to this ref allows the patchset authors to rebase, squash, or amend the patchset commits without requiring client-side use of the *--force* flag on push AND without requiring RW+ permission to the repository. Since each patchset is tracked with a ref it is easy to recover from accidental non-fast-forward updates. Features -------- - Ticket tracker with status changes and responsible assignments - Patchset revision scoring mechanism - Update/Rewrite patchset handling - Close-on-push detection - Server-side Merge button for simple merges - Comments with Markdown syntax support - Rich mail notifications - Voting - Mentions - Watch lists - Querying - Searches - Partial miletones support - Multiple backend options
* Refactor managers and authentication for federationJames Moger2013-11-291-980/+13
| | | | Change-Id: I5ff18b2768095fb14e7fbece2e756115829abbde
* Change IGitblit API to be more distinct from IUserServiceJames Moger2013-11-291-11/+31
| | | | Change-Id: I8fb38fb6a3dae74ad7a12b045b054373b9b02518
* Flattened IGitblitManager, GitblitManager, and GitBlit classesJames Moger2013-11-291-44/+371
| | | | Change-Id: Id6deb27306e0034898673bf5d5d76a4ed012ced6
* Refactor user services and separate authentication (issue-281)James Moger2013-11-291-28/+27
| | | | Change-Id: I336e005e02623fc5e11a4f8b4408bea5465a43fd
* Renamed Gitblit to GitBlit to not break existing Groovy hooksJames Moger2013-11-291-0/+755
| | | | Change-Id: Id5286ed1b9d7e92644cacf857096e6dd273c8f05
* Moved servlets and services to separate packagesJames Moger2013-11-291-426/+0
| | | | Change-Id: I5f0f50f4ae7d332e9f724a2e6f074fa71f646035
* Extract Federation, Gitblit and Services manager from GitBlit singletonJames Moger2013-11-291-1007/+99
| | | | Change-Id: I2b2f361a868c8eedf4b6df5939e7dfac2d5f92a9
* Extract ProjectManager from the GitBlit singletonJames Moger2013-11-291-253/+3
| | | | Change-Id: I93493a473e3d6ea9b2523c1913d6dc323642344d
* Extract RepositoryManager from the GitBlit singletonJames Moger2013-11-291-1798/+18
| | | | Change-Id: I265cfaf25e4093ffa5f53f70d8eb1c20d731b7b3
* Extract SessionManager from GitBlit singletonJames Moger2013-11-291-246/+3
| | | | Change-Id: I85c9dfc1413f858dc28d731a0bf653828626e127
* Extract UserManager from GitBlit singletonJames Moger2013-11-291-368/+49
| | | | Change-Id: I4885255ed63aa6c4e000c3e5501675440dca3958
* Extract NotificationManager from GitBlit singletonJames Moger2013-11-291-125/+5
| | | | Change-Id: I40335a1a3966d6c7c55bcdcca5a6dbf2a91a65d7
* Extract RuntimeManager from GitBlit singletonJames Moger2013-11-291-311/+265
| | | | Change-Id: I5358389396f816da979ec18a31421c2d2b67b3d9
* Create a Gitblit aggregate manager delegate for git upload/receive tasksJames Moger2013-11-291-1/+3
| | | | Change-Id: I2c4a5ddf051f228c0bd949c6cd4fd44c3da81d26
* Eliminate static singleton calls from user servicesJames Moger2013-11-291-1/+1
| | | | Change-Id: Ieec34483822f033b19d3ff3259d071c9bc091ed1
* Use Dagger to inject managers into all filters and servletsJames Moger2013-11-291-7/+12
| | | | Change-Id: I9bb2cc0cbfac9841b13bed15a474fefb24355cd4
* Instantiate and register all servlets and filters from code (servlet 3)James Moger2013-11-261-18/+41
| | | | Change-Id: I6009e8e157232feab40ec275547a59e2cea23950
* Define manager interfaces and update all of Gitblit to use managersJames Moger2013-11-261-226/+292
| | | | | | | | | | | | | | | | | | | | | | | | | These manager interfaces define how the GitBlit singleton will eventually be split into smaller component managers. The Wicket app and all servlets have been updated to request the needed managers. There are _very_ few method signature changes - although there are a handful. This is a surgical sharding of responsibility based on a proof of concept refactor. Instead of random references to GittBlit.self() there are now precise references to the manager interface required to accomplish some task. Some tasks may require references to multiple managers. The code is now littered with calls to GitBlit.getManager(class) and those familiar with the code-base will no doubt notice the duplication of methods from IUserService in IUserManager and the addition of implementation methods in the GitBlit context class. When the GitBlit class is broken apart and the existing external authentication user service classes are refactored to AuthenticationService classes, this will again simplify and flatten. But in order to safely and cleanly modularize the stable code-base we will have to live with a little duplication for a short while. Change-Id: I7314ec8acaab2dcc6092785ed4434cc09fdbbe16
* Automatically disable the Git daemon on ExpressJames Moger2013-11-261-0/+4
| | | | Change-Id: Ide78d4c5db59a734060ce527a59450eed8433c1a
* Automatically adjust web.forwardSlash on Tomcat containersJames Moger2013-11-261-2/+4
| | | | | | | | | | | | | One issue that frequently arises in the discussion group and the bug tracker is how Tomcat automatically re-encodes %2f as '/' which breaks url parameters with %2f. After documenting this in half a dozen places it still comes up. Clearly I haven't done enough. Gitblit will now act on, instead of just report, an improperly configured web.forwardSlash character on Tomcat containers. This will make Gitblit "just work" for more users and will make the world a better place. Change-Id: I344428804070a2d6082022cf6b80e2a3d83cea84
* Eliminate the "enumerate documentation" repository settingJames Moger2013-11-141-2/+0
| | | | Change-Id: I3a7c13b4c626f8b5ea2a63717dfe4249c19eebb4
* Implement mirror executor (issue-5)James Moger2013-11-131-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | The mirror executor will fetch ref updates for repository mirrors. This feature is disabled by default and can be enabled by setting git.enableMirroring=true. The period between update checks is configurable, but it is global. An individual rpeository may not set it's own update schedule. Requirements: 1. you must manually clone the repository using native git git clone --mirror git://somewhere.com/myrepo.git 2. the "origin" remote must be the mirror source 3. the "origin" repository must be accessible without authentication OR the credentials must be embedded in the origin url (not recommended) Notes: 1. "origin" SSH urls are untested and not likely to work 2. mirrors cloned while Gitblit is running are likely to require clearing the gitblit cache (link on the repositories page of an administrator account) 3. Gitblit will automatically repair any invalid fetch refspecs with a "//" sequence. Change-Id: I4bbe3fb2df106366ae4c2313596d0fab0dfcac46
* Remove "show readme" flag in favor of automatic detectionJames Moger2013-10-251-2/+0
| | | | | | | Automatic detection also will now also display a plain text "readme" or "readme.txt" file. Change-Id: Id6be729bdc469e7a5cfd1f4144df340a6b93475e
* Replaced MarkdownPapers with pegdownJames Moger2013-10-181-2/+1
| | | | Change-Id: I11eb50ba1ef0bef8ac47bf6f7b17e0f79ecd3f2d
* Switch web.xml baseFolder from context-param to env-entryJames Moger2013-10-021-0/+15
| | | | Change-Id: Id18077126e984a767725cf9e8d8eb531a14e1713
* Remove remaining TicGit tickets referencesJames Moger2013-09-301-2/+0
| | | | Change-Id: I431659cf1d57a8d9bffb065fa47e1296e7f8c838