aboutsummaryrefslogtreecommitdiffstats
path: root/routers/repo
Commit message (Expand)AuthorAgeFilesLines
* Add missing safety checkMartin Hartkorn2016-02-141-0/+5
* Convert mirrors to regular repositories.Martin Hartkorn2016-02-141-0/+28
* Merge pull request #2599 from mhartkorn/fix-release-error-deleted-userUnknwon2016-02-101-4/+12
|\
| * Removed HTTP 500 error on the release page when a user deleted their accountMartin Hartkorn2016-02-101-4/+12
* | Merge pull request #2528 from andreynering/diff-sintax-highlight-733Unknwon2016-02-073-1/+5
|\ \
| * | Enable sintax highlighting on diff view. Close #733Andrey Nering2016-02-043-1/+5
| |/
* / parse milestone.deadline as local timeTobias Kunicke2016-02-061-2/+2
|/
* Use pretty 404 pages in repo.HTTPBackendFlorian Kaiser2016-02-021-6/+4
* Minor fix for #2444Unknwon2016-02-011-3/+5
* Merge pull request #2444 from bkcsoft/feature/participantsUnknwon2016-02-011-5/+19
|\
| * Go-ism :DKim "BKC" Carlbäcker2016-01-271-3/+3
| * Fixed Poster/Commenter-bug and clean-upKim "BKC" Carlbäcker2016-01-261-3/+1
| * Fix OP not 'participating' until commentedKim "BKC" Carlbäcker2016-01-261-0/+1
| * Optimize participant-fetchingKim Carlbäcker2016-01-261-0/+1
| * Implemented participant-listing for issue-pagesKim "BKC" Carlbäcker2016-01-261-5/+19
* | Make highlighted markdown code blocks work on issue pagesFlorian Kaiser2016-02-011-0/+5
* | Refactoring of inline diff computing to prevent empty diff box. Fix #2489Andrey Nering2016-01-272-12/+0
|/
* Compute inline diff for pull request view, too. Fix #2462Andrey Nering2016-01-251-0/+6
* Admins are allowed to create repos for arbitrary OrgsKim "BKC" Carlbäcker2016-01-201-1/+1
* Merge pull request #2403 from ddelpero/masterUnknwon2016-01-141-1/+1
|\
| * Update repo.goddelpero2016-01-071-1/+1
* | Merge pull request #2335 from andreynering/highlight-diffUnknwon2016-01-091-0/+6
|\ \ | |/ |/|
| * Highlighting differences of lines in the diff view.Andrey Nering2016-01-061-0/+6
* | #2345 disallow access of some pages for empty repoUnknwon2016-01-071-1/+7
* | typo fixzhuharev2016-01-061-2/+2
|/
* Changed name from inline to unifiedKim "BKC" Carlbäcker2016-01-051-2/+2
* Implement Split Diff-ViewKim "BKC" Carlbäcker2016-01-051-0/+2
* #2311 improve HTTP auth error messageUnknwon2015-12-301-6/+9
* more fix on #2268Unknwon2015-12-301-1/+1
* #2283 set text/plain for non-binary files in raw modeUnknwon2015-12-251-0/+2
* #1692 APIs: Users FollowersUnknwon2015-12-212-10/+8
* #2014 allow switch branches between two orgs in compose PRUnknwon2015-12-201-0/+1
* #2251 fix button nameUnknwon2015-12-191-1/+6
* #1692 add organization APIsUnknwon2015-12-171-1/+1
* #2103 #2181 improvments of highlight class nameUnknwon2015-12-161-5/+1
* rename import pathUnknwon2015-12-157-7/+7
* fix possible disclosureUnknwon2015-12-141-6/+12
* improve get commits performanceUnknwon2015-12-131-31/+5
* #2167 able to identify git version on WindowsUnknwon2015-12-131-1/+2
* #2114 External URL for wikiUnknwon2015-12-113-0/+9
* #1575 Limit repo creationUnknwon2015-12-101-3/+5
* #1612 Ability to send mail when a new pull request is submittedUnknwon2015-12-102-4/+9
* move out git module and #1573 send push hookUnknwon2015-12-098-47/+53
* #2037 Add "New Mirror" button on DashboardUnknwon2015-12-091-0/+1
* unified name: IsViewBranch, IsViewCommit and IsViewTagUnknwon2015-12-091-3/+0
* #1984 Better mirror repo managementUnknwon2015-12-082-4/+9
* fix wrong slack webhook payload URLUnknwon2015-12-061-1/+6
* #2063 Ability to delete repo from admin panelUnknwon2015-12-051-0/+2
* fix #2105 and fix #1857Unknwon2015-12-052-332/+385
* fix #1829 and fix #890Unknwon2015-12-045-12/+58
setting.CustomConf, Usage: "Custom configuration file path", }, cli.VersionFlag, cli.StringFlag{ Name: "work-path, w", Value: setting.AppWorkPath, Usage: "Set the gitea working path", }, } // Set the default to be equivalent to cmdWeb and add the default flags app.Flags = append(app.Flags, cmd.CmdWeb.Flags...) app.Flags = append(app.Flags, defaultFlags...) app.Action = cmd.CmdWeb.Action // Add functions to set these paths and these flags to the commands app.Before = establishCustomPath for i := range app.Commands { setFlagsAndBeforeOnSubcommands(&app.Commands[i], defaultFlags, establishCustomPath) } err := app.Run(os.Args) if err != nil { log.Fatal("Failed to run app with %s: %v", os.Args, err) } } func setFlagsAndBeforeOnSubcommands(command *cli.Command, defaultFlags []cli.Flag, before cli.BeforeFunc) { command.Flags = append(command.Flags, defaultFlags...) command.Before = establishCustomPath for i := range command.Subcommands { setFlagsAndBeforeOnSubcommands(&command.Subcommands[i], defaultFlags, before) } } func establishCustomPath(ctx *cli.Context) error { var providedCustom string var providedConf string var providedWorkPath string currentCtx := ctx for { if len(providedCustom) != 0 && len(providedConf) != 0 && len(providedWorkPath) != 0 { break } if currentCtx == nil { break } if currentCtx.IsSet("custom-path") && len(providedCustom) == 0 { providedCustom = currentCtx.String("custom-path") } if currentCtx.IsSet("config") && len(providedConf) == 0 { providedConf = currentCtx.String("config") } if currentCtx.IsSet("work-path") && len(providedWorkPath) == 0 { providedWorkPath = currentCtx.String("work-path") } currentCtx = currentCtx.Parent() } setting.SetCustomPathAndConf(providedCustom, providedConf, providedWorkPath) setAppHelpTemplates() if ctx.IsSet("version") { cli.ShowVersion(ctx) os.Exit(0) } return nil } func setAppHelpTemplates() { cli.AppHelpTemplate = adjustHelpTemplate(originalAppHelpTemplate) cli.CommandHelpTemplate = adjustHelpTemplate(originalCommandHelpTemplate) cli.SubcommandHelpTemplate = adjustHelpTemplate(originalSubcommandHelpTemplate) } func adjustHelpTemplate(originalTemplate string) string { overrided := "" if _, ok := os.LookupEnv("GITEA_CUSTOM"); ok { overrided = "(GITEA_CUSTOM)" } return fmt.Sprintf(`%s DEFAULT CONFIGURATION: CustomPath: %s %s CustomConf: %s AppPath: %s AppWorkPath: %s `, originalTemplate, setting.CustomPath, overrided, setting.CustomConf, setting.AppPath, setting.AppWorkPath) } func formatBuiltWith() string { var version = runtime.Version() if len(MakeVersion) > 0 { version = MakeVersion + ", " + runtime.Version() } if len(Tags) == 0 { return " built with " + version } return " built with " + version + " : " + strings.Replace(Tags, " ", ", ", -1) }