Browse Source

wiki: finish new

Unknwon 9 years ago
parent
commit
392f3ee210

+ 1 - 0
cmd/web.go

@@ -534,6 +534,7 @@ func runWeb(ctx *cli.Context) {
 
 		m.Group("/wiki", func() {
 			m.Get("/?:page", repo.Wiki)
+			m.Get("/_list", repo.WikiList)
 
 			m.Group("", func() {
 				m.Combo("/_new").Get(repo.NewWiki).

+ 1 - 0
conf/locale/locale_en-US.ini

@@ -542,6 +542,7 @@ wiki.create_first_page = Create the first page
 wiki.new_page = Create New Page
 wiki.default_commit_message = Write a note about this update (optional).
 wiki.save_page = Save Page
+wiki.last_commit_info = %s edited this page %s
 
 settings = Settings
 settings.options = Options

+ 0 - 1956
config.codekit

@@ -1,1956 +0,0 @@
-{
-"CodeKitInfo": "This is a CodeKit 2.x project configuration file. It is designed to sync project settings across multiple machines. MODIFYING THE CONTENTS OF THIS FILE IS A POOR LIFE DECISION. If you do so, you will likely cause CodeKit to crash. This file is not useful unless accompanied by the project that created it in CodeKit 2. This file is not backwards-compatible with CodeKit 1.x. For more information, see: http:\/\/incident57.com\/codekit",
-"creatorBuild": "19051",
-"files": {
-	"\/conf\/README.md": {
-		"criticStyle": 0,
-		"enableFootnotes": 0,
-		"enableLabels": 1,
-		"enableSmartQuotes": 1,
-		"escapeLineBreaks": 0,
-		"fileType": 4096,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/conf\/README.md",
-		"maskEmailAddresses": 1,
-		"outputAbbreviatedPath": "\/conf\/README.html",
-		"outputFormat": 0,
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"parseMetadata": 1,
-		"processHTML": 0,
-		"randomFootnoteNumbers": 0,
-		"useCompatibilityMode": 0
-		},
-	"\/CONTRIBUTING.md": {
-		"criticStyle": 0,
-		"enableFootnotes": 0,
-		"enableLabels": 1,
-		"enableSmartQuotes": 1,
-		"escapeLineBreaks": 0,
-		"fileType": 4096,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/CONTRIBUTING.md",
-		"maskEmailAddresses": 1,
-		"outputAbbreviatedPath": "\/CONTRIBUTING.html",
-		"outputFormat": 0,
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"parseMetadata": 1,
-		"processHTML": 0,
-		"randomFootnoteNumbers": 0,
-		"useCompatibilityMode": 0
-		},
-	"\/docker\/README.md": {
-		"criticStyle": 0,
-		"enableFootnotes": 0,
-		"enableLabels": 1,
-		"enableSmartQuotes": 1,
-		"escapeLineBreaks": 0,
-		"fileType": 4096,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/docker\/README.md",
-		"maskEmailAddresses": 1,
-		"outputAbbreviatedPath": "\/docker\/README.html",
-		"outputFormat": 0,
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"parseMetadata": 1,
-		"processHTML": 0,
-		"randomFootnoteNumbers": 0,
-		"useCompatibilityMode": 0
-		},
-	"\/modules\/auth\/ldap\/README.md": {
-		"criticStyle": 0,
-		"enableFootnotes": 0,
-		"enableLabels": 1,
-		"enableSmartQuotes": 1,
-		"escapeLineBreaks": 0,
-		"fileType": 4096,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/modules\/auth\/ldap\/README.md",
-		"maskEmailAddresses": 1,
-		"outputAbbreviatedPath": "\/modules\/auth\/ldap\/README.html",
-		"outputFormat": 0,
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"parseMetadata": 1,
-		"processHTML": 0,
-		"randomFootnoteNumbers": 0,
-		"useCompatibilityMode": 0
-		},
-	"\/modules\/uuid\/README.md": {
-		"criticStyle": 0,
-		"enableFootnotes": 0,
-		"enableLabels": 1,
-		"enableSmartQuotes": 1,
-		"escapeLineBreaks": 0,
-		"fileType": 4096,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/modules\/uuid\/README.md",
-		"maskEmailAddresses": 1,
-		"outputAbbreviatedPath": "\/modules\/uuid\/README.html",
-		"outputFormat": 0,
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"parseMetadata": 1,
-		"processHTML": 0,
-		"randomFootnoteNumbers": 0,
-		"useCompatibilityMode": 0
-		},
-	"\/public\/img\/404.png": {
-		"fileType": 32768,
-		"ignore": 0,
-		"ignoreWasSetByUser": 0,
-		"initialSize": 9776,
-		"inputAbbreviatedPath": "\/public\/img\/404.png",
-		"outputAbbreviatedPath": "\/public\/img\/404.png",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"processed": 1
-		},
-	"\/public\/img\/500.png": {
-		"fileType": 32768,
-		"ignore": 0,
-		"ignoreWasSetByUser": 0,
-		"initialSize": 12087,
-		"inputAbbreviatedPath": "\/public\/img\/500.png",
-		"outputAbbreviatedPath": "\/public\/img\/500.png",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"processed": 1
-		},
-	"\/public\/img\/avatar_default.jpg": {
-		"fileType": 16384,
-		"ignore": 0,
-		"ignoreWasSetByUser": 0,
-		"initialSize": 6951,
-		"inputAbbreviatedPath": "\/public\/img\/avatar_default.jpg",
-		"outputAbbreviatedPath": "\/public\/img\/avatar_default.jpg",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"processed": 1
-		},
-	"\/public\/img\/checkmark.png": {
-		"fileType": 32768,
-		"ignore": 0,
-		"ignoreWasSetByUser": 0,
-		"initialSize": 169,
-		"inputAbbreviatedPath": "\/public\/img\/checkmark.png",
-		"outputAbbreviatedPath": "\/public\/img\/checkmark.png",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"processed": 1
-		},
-	"\/public\/img\/favicon.png": {
-		"fileType": 32768,
-		"ignore": 0,
-		"ignoreWasSetByUser": 0,
-		"initialSize": 10889,
-		"inputAbbreviatedPath": "\/public\/img\/favicon.png",
-		"outputAbbreviatedPath": "\/public\/img\/favicon.png",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"processed": 1
-		},
-	"\/public\/img\/gogs-large-resize.png": {
-		"fileType": 32768,
-		"ignore": 0,
-		"ignoreWasSetByUser": 0,
-		"initialSize": 54978,
-		"inputAbbreviatedPath": "\/public\/img\/gogs-large-resize.png",
-		"outputAbbreviatedPath": "\/public\/img\/gogs-large-resize.png",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"processed": 0
-		},
-	"\/public\/img\/gogs-lg.png": {
-		"fileType": 32768,
-		"ignore": 0,
-		"ignoreWasSetByUser": 0,
-		"initialSize": 97926,
-		"inputAbbreviatedPath": "\/public\/img\/gogs-lg.png",
-		"outputAbbreviatedPath": "\/public\/img\/gogs-lg.png",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"processed": 1
-		},
-	"\/public\/img\/slack.png": {
-		"fileType": 32768,
-		"ignore": 0,
-		"ignoreWasSetByUser": 0,
-		"initialSize": 1633,
-		"inputAbbreviatedPath": "\/public\/img\/slack.png",
-		"outputAbbreviatedPath": "\/public\/img\/slack.png",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"processed": 0
-		},
-	"\/public\/less\/_admin.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/less\/_admin.less",
-		"outputAbbreviatedPath": "\/public\/css\/_admin.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/less\/_base.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/less\/_base.less",
-		"outputAbbreviatedPath": "\/public\/css\/_base.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/less\/_dashboard.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/less\/_dashboard.less",
-		"outputAbbreviatedPath": "\/public\/css\/_dashboard.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/less\/_emojify.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/less\/_emojify.less",
-		"outputAbbreviatedPath": "\/public\/css\/_emojify.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/less\/_explore.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/less\/_explore.less",
-		"outputAbbreviatedPath": "\/public\/css\/_explore.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/less\/_form.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/less\/_form.less",
-		"outputAbbreviatedPath": "\/public\/css\/_form.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/less\/_home.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/less\/_home.less",
-		"outputAbbreviatedPath": "\/public\/css\/_home.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/less\/_install.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/less\/_install.less",
-		"outputAbbreviatedPath": "\/public\/css\/_install.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/less\/_markdown.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/less\/_markdown.less",
-		"outputAbbreviatedPath": "\/public\/css\/_markdown.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/less\/_octicons.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/less\/_octicons.less",
-		"outputAbbreviatedPath": "\/public\/css\/_octicons.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/less\/_organization.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/less\/_organization.less",
-		"outputAbbreviatedPath": "\/public\/css\/_organization.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/less\/_repository.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/less\/_repository.less",
-		"outputAbbreviatedPath": "\/public\/css\/_repository.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/less\/_user.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/less\/_user.less",
-		"outputAbbreviatedPath": "\/public\/css\/_user.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/less\/gogs.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 0,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/less\/gogs.less",
-		"outputAbbreviatedPath": "\/public\/css\/gogs.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 1,
-		"outputStyle": 1,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/ng\/css\/font-awesome.min.css": {
-		"fileType": 16,
-		"ignore": 0,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/css\/font-awesome.min.css",
-		"outputAbbreviatedPath": "No Output Path",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0
-		},
-	"\/public\/ng\/css\/gogs.css": {
-		"fileType": 16,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/css\/gogs.css",
-		"outputAbbreviatedPath": "No Output Path",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0
-		},
-	"\/public\/ng\/css\/magnific-popup.css": {
-		"fileType": 16,
-		"ignore": 0,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/css\/magnific-popup.css",
-		"outputAbbreviatedPath": "No Output Path",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0
-		},
-	"\/public\/ng\/css\/tipsy.css": {
-		"fileType": 16,
-		"ignore": 0,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/css\/tipsy.css",
-		"outputAbbreviatedPath": "No Output Path",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0
-		},
-	"\/public\/ng\/css\/ui.css": {
-		"fileType": 16,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/css\/ui.css",
-		"outputAbbreviatedPath": "No Output Path",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0
-		},
-	"\/public\/ng\/fonts\/octicons.css": {
-		"fileType": 16,
-		"ignore": 0,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/fonts\/octicons.css",
-		"outputAbbreviatedPath": "No Output Path",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0
-		},
-	"\/public\/ng\/js\/gogs.js": {
-		"fileType": 64,
-		"ignore": 0,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/js\/gogs.js",
-		"outputAbbreviatedPath": "\/public\/ng\/js\/min\/gogs-min.js",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 1,
-		"syntaxCheckerStyle": 1
-		},
-	"\/public\/ng\/js\/gogs\/issue_label.js": {
-		"fileType": 64,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/js\/gogs\/issue_label.js",
-		"outputAbbreviatedPath": "\/public\/ng\/js\/gogs\/min\/issue_label-min.js",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 1,
-		"syntaxCheckerStyle": 1
-		},
-	"\/public\/ng\/js\/lib\/jquery-1.11.1.min.js": {
-		"fileType": 64,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/js\/lib\/jquery-1.11.1.min.js",
-		"outputAbbreviatedPath": "\/public\/ng\/js\/lib\/min\/jquery-1.11.1.min-min.js",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 1,
-		"syntaxCheckerStyle": 1
-		},
-	"\/public\/ng\/js\/lib\/jquery.magnific-popup.min.js": {
-		"fileType": 64,
-		"ignore": 0,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/js\/lib\/jquery.magnific-popup.min.js",
-		"outputAbbreviatedPath": "\/public\/ng\/js\/lib\/min\/jquery.magnific-popup.min-min.js",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 1,
-		"syntaxCheckerStyle": 1
-		},
-	"\/public\/ng\/js\/lib\/jquery.tipsy.js": {
-		"fileType": 64,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/js\/lib\/jquery.tipsy.js",
-		"outputAbbreviatedPath": "\/public\/ng\/js\/lib\/min\/jquery.tipsy-min.js",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 1,
-		"syntaxCheckerStyle": 1
-		},
-	"\/public\/ng\/js\/lib\/lib.js": {
-		"fileType": 64,
-		"ignore": 1,
-		"ignoreWasSetByUser": 1,
-		"inputAbbreviatedPath": "\/public\/ng\/js\/lib\/lib.js",
-		"outputAbbreviatedPath": "\/public\/ng\/js\/lib\/min\/lib-min.js",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 1,
-		"syntaxCheckerStyle": 1
-		},
-	"\/public\/ng\/js\/min\/gogs-min.js": {
-		"fileType": 64,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/js\/min\/gogs-min.js",
-		"outputAbbreviatedPath": "\/public\/ng\/js\/min\/min\/gogs-min-min.js",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 1,
-		"syntaxCheckerStyle": 1
-		},
-	"\/public\/ng\/js\/utils\/preview.js": {
-		"fileType": 64,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/js\/utils\/preview.js",
-		"outputAbbreviatedPath": "\/public\/ng\/js\/utils\/min\/preview-min.js",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 1,
-		"syntaxCheckerStyle": 1
-		},
-	"\/public\/ng\/js\/utils\/tabs.js": {
-		"fileType": 64,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/js\/utils\/tabs.js",
-		"outputAbbreviatedPath": "\/public\/ng\/js\/utils\/min\/tabs-min.js",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 1,
-		"syntaxCheckerStyle": 1
-		},
-	"\/public\/ng\/less\/gogs.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 0,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/less\/gogs.less",
-		"outputAbbreviatedPath": "\/public\/ng\/css\/gogs.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/ng\/less\/gogs\/admin.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/less\/gogs\/admin.less",
-		"outputAbbreviatedPath": "\/public\/ng\/less\/css\/admin.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/ng\/less\/gogs\/base.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/less\/gogs\/base.less",
-		"outputAbbreviatedPath": "\/public\/ng\/less\/css\/base.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/ng\/less\/gogs\/dashboard.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/less\/gogs\/dashboard.less",
-		"outputAbbreviatedPath": "\/public\/ng\/less\/css\/dashboard.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/ng\/less\/gogs\/external.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/less\/gogs\/external.less",
-		"outputAbbreviatedPath": "\/public\/ng\/less\/css\/external.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/ng\/less\/gogs\/issue.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/less\/gogs\/issue.less",
-		"outputAbbreviatedPath": "\/public\/ng\/less\/css\/issue.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/ng\/less\/gogs\/markdown.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/less\/gogs\/markdown.less",
-		"outputAbbreviatedPath": "\/public\/ng\/less\/css\/markdown.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/ng\/less\/gogs\/organization.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/less\/gogs\/organization.less",
-		"outputAbbreviatedPath": "\/public\/ng\/less\/css\/organization.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/ng\/less\/gogs\/profile.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/less\/gogs\/profile.less",
-		"outputAbbreviatedPath": "\/public\/ng\/less\/css\/profile.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/ng\/less\/gogs\/repository.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/less\/gogs\/repository.less",
-		"outputAbbreviatedPath": "\/public\/ng\/less\/css\/repository.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/ng\/less\/gogs\/settings.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/less\/gogs\/settings.less",
-		"outputAbbreviatedPath": "\/public\/ng\/less\/css\/settings.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/ng\/less\/gogs\/sign.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/less\/gogs\/sign.less",
-		"outputAbbreviatedPath": "\/public\/ng\/less\/css\/sign.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/ng\/less\/ui.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 0,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/less\/ui.less",
-		"outputAbbreviatedPath": "\/public\/ng\/css\/ui.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/ng\/less\/ui\/alert.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/less\/ui\/alert.less",
-		"outputAbbreviatedPath": "\/public\/ng\/less\/css\/alert.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/ng\/less\/ui\/bread.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/less\/ui\/bread.less",
-		"outputAbbreviatedPath": "\/public\/ng\/less\/css\/bread.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/ng\/less\/ui\/form.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/less\/ui\/form.less",
-		"outputAbbreviatedPath": "\/public\/ng\/less\/css\/form.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/ng\/less\/ui\/grid.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/less\/ui\/grid.less",
-		"outputAbbreviatedPath": "\/public\/ng\/less\/css\/grid.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/ng\/less\/ui\/label.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/less\/ui\/label.less",
-		"outputAbbreviatedPath": "\/public\/ng\/less\/css\/label.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/ng\/less\/ui\/menu.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/less\/ui\/menu.less",
-		"outputAbbreviatedPath": "\/public\/ng\/less\/css\/menu.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/ng\/less\/ui\/pager.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/less\/ui\/pager.less",
-		"outputAbbreviatedPath": "\/public\/ng\/less\/css\/pager.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/ng\/less\/ui\/panel.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/less\/ui\/panel.less",
-		"outputAbbreviatedPath": "\/public\/ng\/less\/css\/panel.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/ng\/less\/ui\/reset.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/less\/ui\/reset.less",
-		"outputAbbreviatedPath": "\/public\/ng\/less\/css\/reset.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/ng\/less\/ui\/table.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/less\/ui\/table.less",
-		"outputAbbreviatedPath": "\/public\/ng\/less\/css\/table.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/public\/ng\/less\/ui\/var.less": {
-		"allowInsecureImports": 0,
-		"createSourceMap": 0,
-		"disableJavascript": 0,
-		"fileType": 1,
-		"ieCompatibility": 1,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/public\/ng\/less\/ui\/var.less",
-		"outputAbbreviatedPath": "\/public\/ng\/less\/css\/var.css",
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"relativeURLS": 0,
-		"shouldRunAutoprefixer": 0,
-		"shouldRunBless": 0,
-		"strictImports": 0,
-		"strictMath": 0,
-		"strictUnits": 0
-		},
-	"\/README.md": {
-		"criticStyle": 0,
-		"enableFootnotes": 0,
-		"enableLabels": 1,
-		"enableSmartQuotes": 1,
-		"escapeLineBreaks": 0,
-		"fileType": 4096,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/README.md",
-		"maskEmailAddresses": 1,
-		"outputAbbreviatedPath": "\/README.html",
-		"outputFormat": 0,
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"parseMetadata": 1,
-		"processHTML": 0,
-		"randomFootnoteNumbers": 0,
-		"useCompatibilityMode": 0
-		},
-	"\/README_ZH.md": {
-		"criticStyle": 0,
-		"enableFootnotes": 0,
-		"enableLabels": 1,
-		"enableSmartQuotes": 1,
-		"escapeLineBreaks": 0,
-		"fileType": 4096,
-		"ignore": 1,
-		"ignoreWasSetByUser": 0,
-		"inputAbbreviatedPath": "\/README_ZH.md",
-		"maskEmailAddresses": 1,
-		"outputAbbreviatedPath": "\/README_ZH.html",
-		"outputFormat": 0,
-		"outputPathIsOutsideProject": 0,
-		"outputPathIsSetByUser": 0,
-		"outputStyle": 0,
-		"parseMetadata": 1,
-		"processHTML": 0,
-		"randomFootnoteNumbers": 0,
-		"useCompatibilityMode": 0
-		}
-	},
-"hooks": [
-	],
-"lastSavedByUser": "Jiahua Chen",
-"manualImportLinks": {
-	},
-"projectAttributes": {
-	"bowerAbbreviatedPath": "",
-	"displayValue": "gogs",
-	"displayValueWasSetByUser": 1,
-	"iconImageName": "compass_yellow"
-	},
-"projectSettings": {
-	"alwaysUseExternalServer": 0,
-	"animateCSSInjections": 1,
-	"autoApplyPSLanguageSettingsStyle": 0,
-	"autoprefixerBrowserString": "> 1%, last 2 versions, Firefox ESR, Opera 12.1",
-	"autoSyncProjectSettingsFile": 1,
-	"browserRefreshDelay": 0,
-	"coffeeAutoOutputPathEnabled": 1,
-	"coffeeAutoOutputPathFilenamePattern": "*.js",
-	"coffeeAutoOutputPathRelativePath": "",
-	"coffeeAutoOutputPathReplace1": "",
-	"coffeeAutoOutputPathReplace2": "",
-	"coffeeAutoOutputPathStyle": 0,
-	"coffeeCreateSourceMap": 0,
-	"coffeeLintFlags2": {
-		"arrow_spacing": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"camel_case_classes": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"colon_assignment_spacing": {
-			"active": 0,
-			"flagValue": 1
-			},
-		"cyclomatic_complexity": {
-			"active": 0,
-			"flagValue": 10
-			},
-		"duplicate_key": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"empty_constructor_needs_parens": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"ensure_comprehensions": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"indentation": {
-			"active": 1,
-			"flagValue": 2
-			},
-		"line_endings": {
-			"active": 0,
-			"flagValue": 0
-			},
-		"max_line_length": {
-			"active": 0,
-			"flagValue": 150
-			},
-		"missing_fat_arrows": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"newlines_after_classes": {
-			"active": 0,
-			"flagValue": 3
-			},
-		"no_backticks": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"no_debugger": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"no_empty_functions": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"no_empty_param_list": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"no_implicit_braces": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"no_implicit_parens": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"no_interpolation_in_single_quotes": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"no_plusplus": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"no_stand_alone_at": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"no_tabs": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"no_throwing_strings": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"no_trailing_semicolons": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"no_trailing_whitespace": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"no_unnecessary_double_quotes": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"no_unnecessary_fat_arrows": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"non_empty_constructor_needs_parens": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"prefer_english_operator": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"space_operators": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"spacing_after_comma": {
-			"active": 1,
-			"flagValue": -1
-			}
-		},
-	"coffeeMinifyOutput": 1,
-	"coffeeOutputStyle": 0,
-	"coffeeSyntaxCheckerStyle": 1,
-	"externalServerAddress": "http:\/\/localhost:8888",
-	"externalServerPreviewPathAddition": "",
-	"genericWebpageFileExtensionsString": "html, htm, shtml, shtm, xhtml, php, jsp, asp, aspx, erb, ctp",
-	"hamlAutoOutputPathEnabled": 1,
-	"hamlAutoOutputPathFilenamePattern": "*.html",
-	"hamlAutoOutputPathRelativePath": "",
-	"hamlAutoOutputPathReplace1": "",
-	"hamlAutoOutputPathReplace2": "",
-	"hamlAutoOutputPathStyle": 0,
-	"hamlEscapeHTMLCharacters": 0,
-	"hamlNoEscapeInAttributes": 0,
-	"hamlOutputFormat": 2,
-	"hamlOutputStyle": 0,
-	"hamlUseCDATA": 0,
-	"hamlUseDoubleQuotes": 0,
-	"hamlUseUnixNewlines": 0,
-	"jadeAutoOutputPathEnabled": 1,
-	"jadeAutoOutputPathFilenamePattern": "*.html",
-	"jadeAutoOutputPathRelativePath": "",
-	"jadeAutoOutputPathReplace1": "",
-	"jadeAutoOutputPathReplace2": "",
-	"jadeAutoOutputPathStyle": 0,
-	"jadeCompileDebug": 1,
-	"jadeOutputStyle": 0,
-	"javascriptAutoOutputPathEnabled": 1,
-	"javascriptAutoOutputPathFilenamePattern": "*-min.js",
-	"javascriptAutoOutputPathRelativePath": "\/min",
-	"javascriptAutoOutputPathReplace1": "",
-	"javascriptAutoOutputPathReplace2": "",
-	"javascriptAutoOutputPathStyle": 2,
-	"javascriptCreateSourceMap": 1,
-	"javascriptOutputStyle": 1,
-	"javascriptSyntaxCheckerStyle": 1,
-	"jsCheckerReservedNamesString": "",
-	"jsHintFlags2": {
-		"asi": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"bitwise": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"boss": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"browser": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"browserify": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"camelcase": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"couch": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"curly": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"debug": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"devel": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"dojo": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"elision": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"eqeqeq": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"eqnull": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"es3": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"esnext": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"evil": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"expr": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"forin": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"freeze": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"funcscope": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"futurehostile": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"globalstrict": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"immed": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"indent": {
-			"active": 0,
-			"flagValue": 4
-			},
-		"iterator": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"jasmine": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"jquery": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"lastsemic": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"latedef": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"laxbreak": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"laxcomma": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"loopfunc": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"maxcomplexity": {
-			"active": 0,
-			"flagValue": 10
-			},
-		"maxdepth": {
-			"active": 0,
-			"flagValue": 3
-			},
-		"maxlen": {
-			"active": 0,
-			"flagValue": 150
-			},
-		"maxparams": {
-			"active": 0,
-			"flagValue": 3
-			},
-		"maxstatements": {
-			"active": 0,
-			"flagValue": 4
-			},
-		"mocha": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"mootools": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"moz": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"multistr": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"newcap": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"noarg": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"nocomma": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"node": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"noempty": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"nonbsp": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"nonew": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"nonstandard": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"notypeof": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"noyield": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"onecase": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"phantom": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"plusplus": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"proto": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"prototypejs": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"qunit": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"regexp": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"rhino": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"scripturl": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"shadow": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"shelljs": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"singleGroups": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"strict": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"sub": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"supernew": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"typed": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"undef": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"unused": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"varstmt": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"withstmt": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"worker": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"wsh": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"yui": {
-			"active": 0,
-			"flagValue": -1
-			}
-		},
-	"jsLintFlags2": {
-		"bitwise": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"browser": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"couch": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"devel": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"es6": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"eval": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"for": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"maxlen": {
-			"active": 0,
-			"flagValue": 150
-			},
-		"node": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"this": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"white": {
-			"active": 0,
-			"flagValue": -1
-			}
-		},
-	"jsonAutoOutputPathEnabled": 0,
-	"jsonAutoOutputPathFilenamePattern": "*-min.json",
-	"jsonAutoOutputPathRelativePath": "",
-	"jsonAutoOutputPathReplace1": "",
-	"jsonAutoOutputPathReplace2": "",
-	"jsonAutoOutputPathStyle": 0,
-	"jsonOrderOutput": 0,
-	"jsonOutputStyle": 1,
-	"kitAutoOutputPathEnabled": 1,
-	"kitAutoOutputPathFilenamePattern": "*.html",
-	"kitAutoOutputPathRelativePath": "",
-	"kitAutoOutputPathReplace1": "",
-	"kitAutoOutputPathReplace2": "",
-	"kitAutoOutputPathStyle": 0,
-	"lessAllowInsecureImports": 0,
-	"lessAutoOutputPathEnabled": 1,
-	"lessAutoOutputPathFilenamePattern": "*.css",
-	"lessAutoOutputPathRelativePath": "..\/css",
-	"lessAutoOutputPathReplace1": "less",
-	"lessAutoOutputPathReplace2": "css",
-	"lessAutoOutputPathStyle": 2,
-	"lessCreateSourceMap": 0,
-	"lessDisableJavascript": 0,
-	"lessIeCompatibility": 1,
-	"lessOutputStyle": 0,
-	"lessRelativeURLS": 0,
-	"lessStrictImports": 0,
-	"lessStrictMath": 0,
-	"lessStrictUnits": 0,
-	"markdownAutoOutputPathEnabled": 0,
-	"markdownAutoOutputPathFilenamePattern": "*.html",
-	"markdownAutoOutputPathRelativePath": "",
-	"markdownAutoOutputPathReplace1": "",
-	"markdownAutoOutputPathReplace2": "",
-	"markdownAutoOutputPathStyle": 0,
-	"markdownCriticStyle": 0,
-	"markdownEnableFootnotes": 0,
-	"markdownEnableLabels": 1,
-	"markdownEnableSmartQuotes": 1,
-	"markdownEscapeLineBreaks": 0,
-	"markdownMaskEmailAddresses": 1,
-	"markdownOutputFormat": 0,
-	"markdownOutputStyle": 0,
-	"markdownParseMetadata": 1,
-	"markdownProcessHTML": 0,
-	"markdownRandomFootnoteNumbers": 0,
-	"markdownUseCompatibilityMode": 0,
-	"reloadFileURLs": 0,
-	"sassAutoOutputPathEnabled": 1,
-	"sassAutoOutputPathFilenamePattern": "*.css",
-	"sassAutoOutputPathRelativePath": "..\/css",
-	"sassAutoOutputPathReplace1": "sass",
-	"sassAutoOutputPathReplace2": "css",
-	"sassAutoOutputPathStyle": 2,
-	"sassCreateSourceMap": 0,
-	"sassDebugStyle": 0,
-	"sassDecimalPrecision": 5,
-	"sassOutputStyle": 0,
-	"sassUseLibsass": 0,
-	"shouldRunAutoprefixer": 0,
-	"shouldRunBless": 0,
-	"skippedItemsString": "\/public\/js, _logs, \/public\/js\/lib, .hg, _cache, log, logs, cache, .svn, .git, \/public\/img\/emoji, \/public\/css",
-	"slimAutoOutputPathEnabled": 1,
-	"slimAutoOutputPathFilenamePattern": "*.html",
-	"slimAutoOutputPathRelativePath": "",
-	"slimAutoOutputPathReplace1": "",
-	"slimAutoOutputPathReplace2": "",
-	"slimAutoOutputPathStyle": 0,
-	"slimCompileOnly": 0,
-	"slimLogicless": 0,
-	"slimOutputFormat": 0,
-	"slimOutputStyle": 1,
-	"slimRailsCompatible": 0,
-	"stylusAutoOutputPathEnabled": 1,
-	"stylusAutoOutputPathFilenamePattern": "*.css",
-	"stylusAutoOutputPathRelativePath": "..\/css",
-	"stylusAutoOutputPathReplace1": "stylus",
-	"stylusAutoOutputPathReplace2": "css",
-	"stylusAutoOutputPathStyle": 2,
-	"stylusCreateSourceMap": 0,
-	"stylusDebugStyle": 0,
-	"stylusImportCSS": 0,
-	"stylusOutputStyle": 0,
-	"stylusResolveRelativeURLS": 0,
-	"typescriptAutoOutputPathEnabled": 1,
-	"typescriptAutoOutputPathFilenamePattern": "*.js",
-	"typescriptAutoOutputPathRelativePath": "\/js",
-	"typescriptAutoOutputPathReplace1": "",
-	"typescriptAutoOutputPathReplace2": "",
-	"typescriptAutoOutputPathStyle": 2,
-	"typescriptCreateDeclarationFile": 0,
-	"typescriptCreateSourceMap": 0,
-	"typescriptMinifyOutput": 0,
-	"typescriptModuleType": 0,
-	"typescriptNoImplicitAny": 0,
-	"typescriptPreserveConstEnums": 0,
-	"typescriptRemoveComments": 0,
-	"typescriptSuppressImplicitAnyIndexErrors": 0,
-	"typescriptTargetECMAVersion": 0,
-	"uglifyDefinesString": "",
-	"uglifyFlags2": {
-		"ascii-only": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"bare-returns": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"booleans": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"bracketize": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"cascade": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"comments": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"comparisons": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"compress": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"conditionals": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"dead_code": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"drop_console": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"drop_debugger": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"eval": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"evaluate": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"hoist_funs": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"hoist_vars": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"if_return": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"indent-level": {
-			"active": 0,
-			"flagValue": 4
-			},
-		"indent-start": {
-			"active": 0,
-			"flagValue": 0
-			},
-		"inline-script": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"join_vars": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"keep_fargs": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"keep_fnames": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"loops": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"mangle": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"max-line-len": {
-			"active": 1,
-			"flagValue": 32000
-			},
-		"negate_iife": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"properties": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"pure_getters": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"quote-keys": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"screw-ie8": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"semicolons": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"sequences": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"sort": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"space-colon": {
-			"active": 1,
-			"flagValue": -1
-			},
-		"toplevel": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"unsafe": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"unused": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"warnings": {
-			"active": 0,
-			"flagValue": -1
-			},
-		"width": {
-			"active": 1,
-			"flagValue": 80
-			}
-		},
-	"uglifyReservedNamesString": "$",
-	"websiteRelativeRoot": ""
-	},
-"settingsFileVersion": "2"
-}

+ 4 - 0
models/release.go

@@ -51,6 +51,10 @@ func IsReleaseExist(repoID int64, tagName string) (bool, error) {
 	return x.Get(&Release{RepoID: repoID, LowerTagName: strings.ToLower(tagName)})
 }
 
+func init() {
+	git.GetVersion()
+}
+
 func createTag(gitRepo *git.Repository, rel *Release) error {
 	// Only actual create when publish.
 	if !rel.IsDraft {

+ 32 - 37
models/repo.go

@@ -31,7 +31,6 @@ import (
 
 	"github.com/gogits/gogs/modules/base"
 	"github.com/gogits/gogs/modules/bindata"
-	oldgit "github.com/gogits/gogs/modules/git"
 	"github.com/gogits/gogs/modules/log"
 	"github.com/gogits/gogs/modules/process"
 	"github.com/gogits/gogs/modules/setting"
@@ -317,27 +316,24 @@ func (repo *Repository) LocalCopyPath() string {
 	return path.Join(setting.AppDataPath, "tmp/local", com.ToStr(repo.ID))
 }
 
-// UpdateLocalCopy makes sure the local copy of repository is up-to-date.
-func (repo *Repository) UpdateLocalCopy() error {
-	repoPath := repo.RepoPath()
-	localPath := repo.LocalCopyPath()
+func updateLocalCopy(repoPath, localPath string) error {
 	if !com.IsExist(localPath) {
-		_, stderr, err := process.Exec(
-			fmt.Sprintf("UpdateLocalCopy(git clone): %s", repoPath), "git", "clone", repoPath, localPath)
-		if err != nil {
-			return fmt.Errorf("git clone: %v - %s", err, stderr)
+		if err := git.Clone(repoPath, localPath); err != nil {
+			return fmt.Errorf("Clone: %v", err)
 		}
 	} else {
-		_, stderr, err := process.ExecDir(-1, localPath,
-			fmt.Sprintf("UpdateLocalCopy(git pull --all): %s", repoPath), "git", "pull", "--all")
-		if err != nil {
-			return fmt.Errorf("git pull: %v - %s", err, stderr)
+		if err := git.Pull(localPath, true); err != nil {
+			return fmt.Errorf("Pull: %v", err)
 		}
 	}
-
 	return nil
 }
 
+// UpdateLocalCopy makes sure the local copy of repository is up-to-date.
+func (repo *Repository) UpdateLocalCopy() error {
+	return updateLocalCopy(repo.RepoPath(), repo.LocalCopyPath())
+}
+
 // PatchPath returns corresponding patch file path of repository by given issue ID.
 func (repo *Repository) PatchPath(index int64) (string, error) {
 	if err := repo.GetOwner(); err != nil {
@@ -471,6 +467,11 @@ func UpdateMirror(m *Mirror) error {
 	return updateMirror(x, m)
 }
 
+func createUpdateHook(repoPath string) error {
+	return git.SetUpdateHook(repoPath,
+		fmt.Sprintf(_TPL_UPDATE_HOOK, setting.ScriptType, "\""+setting.AppPath+"\"", setting.CustomConf))
+}
+
 // MirrorRepository creates a mirror repository from source.
 func MirrorRepository(repoId int64, userName, repoName, repoPath, url string) error {
 	_, stderr, err := process.ExecTimeout(10*time.Minute,
@@ -568,20 +569,26 @@ func MigrateRepository(u *User, opts MigrateRepoOptions) (*Repository, error) {
 		}
 	}
 
-	// Check if repository has master branch, if so set it to default branch.
-	gitRepo, err := oldgit.OpenRepository(repoPath)
+	// Try to get HEAD branch and set it as default branch.
+	gitRepo, err := git.OpenRepository(repoPath)
+	if err != nil {
+		log.Error(4, "OpenRepository: %v", err)
+		return repo, nil
+	}
+	headBranch, err := gitRepo.GetHEADBranch()
 	if err != nil {
-		return repo, fmt.Errorf("open git repository: %v", err)
+		log.Error(4, "GetHEADBranch: %v", err)
+		return repo, nil
 	}
-	if gitRepo.IsBranchExist("master") {
-		repo.DefaultBranch = "master"
+	if headBranch != nil {
+		repo.DefaultBranch = headBranch.Name
 	}
 
 	return repo, UpdateRepository(repo, false)
 }
 
 // initRepoCommit temporarily changes with work directory.
-func initRepoCommit(tmpPath string, sig *oldgit.Signature) (err error) {
+func initRepoCommit(tmpPath string, sig *git.Signature) (err error) {
 	var stderr string
 	if _, stderr, err = process.ExecDir(-1,
 		tmpPath, fmt.Sprintf("initRepoCommit (git add): %s", tmpPath),
@@ -604,13 +611,6 @@ func initRepoCommit(tmpPath string, sig *oldgit.Signature) (err error) {
 	return nil
 }
 
-func createUpdateHook(repoPath string) error {
-	hookPath := path.Join(repoPath, "hooks/update")
-	os.MkdirAll(path.Dir(hookPath), os.ModePerm)
-	return ioutil.WriteFile(hookPath,
-		[]byte(fmt.Sprintf(_TPL_UPDATE_HOOK, setting.ScriptType, "\""+setting.AppPath+"\"", setting.CustomConf)), 0777)
-}
-
 type CreateRepoOptions struct {
 	Name        string
 	Description string
@@ -699,22 +699,17 @@ func prepareRepoCommit(repo *Repository, tmpDir, repoPath string, opts CreateRep
 }
 
 // InitRepository initializes README and .gitignore if needed.
-func initRepository(e Engine, repoPath string, u *User, repo *Repository, opts CreateRepoOptions) error {
+func initRepository(e Engine, repoPath string, u *User, repo *Repository, opts CreateRepoOptions) (err error) {
 	// Somehow the directory could exist.
 	if com.IsExist(repoPath) {
 		return fmt.Errorf("initRepository: path already exists: %s", repoPath)
 	}
 
 	// Init bare new repository.
-	os.MkdirAll(repoPath, os.ModePerm)
-	_, stderr, err := process.ExecDir(-1, repoPath,
-		fmt.Sprintf("initRepository (git init --bare): %s", repoPath), "git", "init", "--bare")
-	if err != nil {
-		return fmt.Errorf("git init --bare: %v - %s", err, stderr)
-	}
-
-	if err := createUpdateHook(repoPath); err != nil {
-		return err
+	if err = git.InitRepository(repoPath, true); err != nil {
+		return fmt.Errorf("InitRepository: %v", err)
+	} else if err = createUpdateHook(repoPath); err != nil {
+		return fmt.Errorf("createUpdateHook: %v", err)
 	}
 
 	tmpDir := filepath.Join(os.TempDir(), "gogs-"+repo.Name+"-"+com.ToStr(time.Now().Nanosecond()))

+ 6 - 4
models/user.go

@@ -25,9 +25,11 @@ import (
 	"github.com/go-xorm/xorm"
 	"github.com/nfnt/resize"
 
+	"github.com/gogits/git-shell"
+
 	"github.com/gogits/gogs/modules/avatar"
 	"github.com/gogits/gogs/modules/base"
-	"github.com/gogits/gogs/modules/git"
+	oldgit "github.com/gogits/gogs/modules/git"
 	"github.com/gogits/gogs/modules/log"
 	"github.com/gogits/gogs/modules/setting"
 )
@@ -938,11 +940,11 @@ func MakeEmailPrimary(email *EmailAddress) error {
 // UserCommit represents a commit with validation of user.
 type UserCommit struct {
 	User *User
-	*git.Commit
+	*oldgit.Commit
 }
 
 // ValidateCommitWithEmail chceck if author's e-mail of commit is corresponsind to a user.
-func ValidateCommitWithEmail(c *git.Commit) *User {
+func ValidateCommitWithEmail(c *oldgit.Commit) *User {
 	u, err := GetUserByEmail(c.Author.Email)
 	if err != nil {
 		return nil
@@ -959,7 +961,7 @@ func ValidateCommitsWithEmails(oldCommits *list.List) *list.List {
 		e          = oldCommits.Front()
 	)
 	for e != nil {
-		c := e.Value.(*git.Commit)
+		c := e.Value.(*oldgit.Commit)
 
 		if v, ok := emails[c.Author.Email]; !ok {
 			u, _ = GetUserByEmail(c.Author.Email)

+ 101 - 3
models/wiki.go

@@ -6,19 +6,72 @@ package models
 
 import (
 	"fmt"
+	"io/ioutil"
+	"path"
 	"path/filepath"
 	"strings"
+	"sync"
 
 	"github.com/Unknwon/com"
 
 	"github.com/gogits/git-shell"
+
+	"github.com/gogits/gogs/modules/setting"
 )
 
-// ToWikiPageName formats a string to corresponding wiki URL name.
-func ToWikiPageName(name string) string {
+// workingPool represents a pool of working status which makes sure
+// that only one instance of same task is performing at a time.
+// However, different type of tasks can performing at the same time.
+type workingPool struct {
+	lock  sync.Mutex
+	pool  map[string]*sync.Mutex
+	count map[string]int
+}
+
+// CheckIn checks in a task and waits if others are running.
+func (p *workingPool) CheckIn(name string) {
+	p.lock.Lock()
+
+	lock, has := p.pool[name]
+	if !has {
+		lock = &sync.Mutex{}
+		p.pool[name] = lock
+	}
+	p.count[name]++
+
+	p.lock.Unlock()
+	lock.Lock()
+}
+
+// CheckOut checks out a task to let other tasks run.
+func (p *workingPool) CheckOut(name string) {
+	p.lock.Lock()
+	defer p.lock.Unlock()
+
+	p.pool[name].Unlock()
+	if p.count[name] == 1 {
+		delete(p.pool, name)
+		delete(p.count, name)
+	} else {
+		p.count[name]--
+	}
+}
+
+var wikiWorkingPool = &workingPool{
+	pool:  make(map[string]*sync.Mutex),
+	count: make(map[string]int),
+}
+
+// ToWikiPageURL formats a string to corresponding wiki URL name.
+func ToWikiPageURL(name string) string {
 	return strings.Replace(name, " ", "-", -1)
 }
 
+// ToWikiPageName formats a URL back to corresponding wiki page name.
+func ToWikiPageName(name string) string {
+	return strings.Replace(name, "-", " ", -1)
+}
+
 // WikiPath returns wiki data path by given user and repository name.
 func WikiPath(userName, repoName string) string {
 	return filepath.Join(UserPath(userName), strings.ToLower(repoName)+".wiki.git")
@@ -46,11 +99,56 @@ func (repo *Repository) InitWiki() error {
 	return nil
 }
 
+func (repo *Repository) LocalWikiPath() string {
+	return path.Join(setting.AppDataPath, "tmp/local-wiki", com.ToStr(repo.ID))
+}
+
+// UpdateLocalWiki makes sure the local copy of repository wiki is up-to-date.
+func (repo *Repository) UpdateLocalWiki() error {
+	return updateLocalCopy(repo.WikiPath(), repo.LocalWikiPath())
+}
+
 // AddWikiPage adds new page to repository wiki.
-func (repo *Repository) AddWikiPage(title, content, message string) (err error) {
+func (repo *Repository) AddWikiPage(doer *User, title, content, message string) (err error) {
+	wikiWorkingPool.CheckIn(com.ToStr(repo.ID))
+	defer wikiWorkingPool.CheckOut(com.ToStr(repo.ID))
+
 	if err = repo.InitWiki(); err != nil {
 		return fmt.Errorf("InitWiki: %v", err)
 	}
 
+	localPath := repo.LocalWikiPath()
+
+	// Discard local commits make sure even to remote when local copy exists.
+	if com.IsExist(localPath) {
+		// No need to check if nothing in the repository.
+		if git.IsBranchExist(localPath, "master") {
+			if err = git.Reset(localPath, true, "origin/master"); err != nil {
+				return fmt.Errorf("Reset: %v", err)
+			}
+		}
+	}
+
+	if err = repo.UpdateLocalWiki(); err != nil {
+		return fmt.Errorf("UpdateLocalWiki: %v", err)
+	}
+
+	title = strings.Replace(title, "/", " ", -1)
+	filename := path.Join(localPath, title+".md")
+	if err = ioutil.WriteFile(filename, []byte(content), 0666); err != nil {
+		return fmt.Errorf("WriteFile: %v", err)
+	}
+
+	if len(message) == 0 {
+		message = "Update page '" + title + "'"
+	}
+	if err = git.AddChanges(localPath, true); err != nil {
+		return fmt.Errorf("AddChanges: %v", err)
+	} else if err = git.CommitChanges(localPath, message, doer.NewGitSig()); err != nil {
+		return fmt.Errorf("CommitChanges: %v", err)
+	} else if err = git.Push(localPath, "origin", "master"); err != nil {
+		return fmt.Errorf("Push: %v", err)
+	}
+
 	return nil
 }

+ 1 - 1
modules/auth/repo_form.go

@@ -247,7 +247,7 @@ func (f *EditReleaseForm) Validate(ctx *macaron.Context, errs binding.Errors) bi
 
 type NewWikiForm struct {
 	Title   string `binding:"Required"`
-	Content string
+	Content string `binding:"Required"`
 	Message string
 }
 

File diff suppressed because it is too large
+ 112 - 112
modules/bindata/bindata.go


+ 1 - 13
public/config.codekit

@@ -1,6 +1,6 @@
 {
 "CodeKitInfo": "This is a CodeKit 2.x project configuration file. It is designed to sync project settings across multiple machines. MODIFYING THE CONTENTS OF THIS FILE IS A POOR LIFE DECISION. If you do so, you will likely cause CodeKit to crash. This file is not useful unless accompanied by the project that created it in CodeKit 2. This file is not backwards-compatible with CodeKit 1.x. For more information, see: http:\/\/incident57.com\/codekit",
-"creatorBuild": "19102",
+"creatorBuild": "19076",
 "files": {
 	"\/css\/dropzone-4.2.0.css": {
 		"fileType": 16,
@@ -616,18 +616,10 @@
 			"active": 0,
 			"flagValue": -1
 			},
-		"no_nested_string_interpolation": {
-			"active": 1,
-			"flagValue": -1
-			},
 		"no_plusplus": {
 			"active": 0,
 			"flagValue": -1
 			},
-		"no_private_function_fat_arrows": {
-			"active": 1,
-			"flagValue": -1
-			},
 		"no_stand_alone_at": {
 			"active": 1,
 			"flagValue": -1
@@ -636,10 +628,6 @@
 			"active": 1,
 			"flagValue": -1
 			},
-		"no_this": {
-			"active": 0,
-			"flagValue": -1
-			},
 		"no_throwing_strings": {
 			"active": 1,
 			"flagValue": -1

+ 14 - 0
public/css/gogs.css

@@ -2531,6 +2531,20 @@ footer .container .links > *:first-child {
 .repository.wiki.new .editor-preview {
   background-color: white;
 }
+.repository.wiki.view .ui.sub.header {
+  text-transform: none;
+}
+.repository.wiki.view .markdown {
+  padding: 15px 30px;
+}
+.repository.wiki.view .markdown h1:first-of-type,
+.repository.wiki.view .markdown h2:first-of-type,
+.repository.wiki.view .markdown h3:first-of-type,
+.repository.wiki.view .markdown h4:first-of-type,
+.repository.wiki.view .markdown h5:first-of-type,
+.repository.wiki.view .markdown h6:first-of-type {
+  margin-top: 0;
+}
 .repository.settings.collaboration .collaborator.list {
   padding: 0;
 }

+ 18 - 0
public/less/_repository.less

@@ -970,6 +970,24 @@
 				background-color: white;
 			}
 		}
+
+		&.view {
+			.header:not(.sub) {
+				// padding-left: 30px;
+			}
+			.ui.sub.header {
+				text-transform: none;
+			}
+			.markdown {
+		    padding: 15px 30px;
+
+		    h1, h2, h3, h4, h5, h6 {
+		    	&:first-of-type {
+		    		margin-top: 0;
+		    	}
+		    }
+			}
+		}
 	}
 
 	&.settings {

+ 58 - 3
routers/repo/wiki.go

@@ -5,6 +5,10 @@
 package repo
 
 import (
+	"io/ioutil"
+
+	"github.com/gogits/git-shell"
+
 	"github.com/gogits/gogs/models"
 	"github.com/gogits/gogs/modules/auth"
 	"github.com/gogits/gogs/modules/base"
@@ -18,17 +22,68 @@ const (
 )
 
 func Wiki(ctx *middleware.Context) {
-	ctx.Data["Title"] = ctx.Tr("repo.wiki")
 	ctx.Data["PageIsWiki"] = true
 
 	if !ctx.Repo.Repository.HasWiki() {
+		ctx.Data["Title"] = ctx.Tr("repo.wiki")
 		ctx.HTML(200, WIKI_START)
 		return
 	}
 
+	wikiRepo, err := git.OpenRepository(ctx.Repo.Repository.WikiPath())
+	if err != nil {
+		ctx.Handle(500, "OpenRepository", err)
+		return
+	}
+	commit, err := wikiRepo.GetCommitOfBranch("master")
+	if err != nil {
+		ctx.Handle(500, "GetCommitOfBranch", err)
+		return
+	}
+
+	page := models.ToWikiPageName(ctx.Params(":page"))
+	if len(page) == 0 {
+		page = "Home"
+	}
+	ctx.Data["Title"] = page
+	ctx.Data["RequireHighlightJS"] = true
+
+	blob, err := commit.GetBlobByPath(page + ".md")
+	if err != nil {
+		if git.IsErrNotExist(err) {
+			ctx.Redirect(ctx.Repo.RepoLink + "/wiki/_list")
+		} else {
+			ctx.Handle(500, "GetBlobByPath", err)
+		}
+		return
+	}
+	r, err := blob.Data()
+	if err != nil {
+		ctx.Handle(500, "Data", err)
+		return
+	}
+	data, err := ioutil.ReadAll(r)
+	if err != nil {
+		ctx.Handle(500, "ReadAll", err)
+		return
+	}
+	ctx.Data["Content"] = string(base.RenderMarkdown(data, ctx.Repo.RepoLink))
+
+	// Get last change information.
+	lastCommit, err := wikiRepo.GetCommitByPath(page + ".md")
+	if err != nil {
+		ctx.Handle(500, "GetCommitByPath", err)
+		return
+	}
+	ctx.Data["Author"] = lastCommit.Author
+
 	ctx.HTML(200, WIKI_VIEW)
 }
 
+func WikiList(ctx *middleware.Context) {
+
+}
+
 func NewWiki(ctx *middleware.Context) {
 	ctx.Data["Title"] = ctx.Tr("repo.wiki.new_page")
 	ctx.Data["PageIsWiki"] = true
@@ -51,12 +106,12 @@ func NewWikiPost(ctx *middleware.Context, form auth.NewWikiForm) {
 		return
 	}
 
-	if err := ctx.Repo.Repository.AddWikiPage(form.Title, form.Content, form.Message); err != nil {
+	if err := ctx.Repo.Repository.AddWikiPage(ctx.User, form.Title, form.Content, form.Message); err != nil {
 		ctx.Handle(500, "AddWikiPage", err)
 		return
 	}
 
-	ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.ToWikiPageName(form.Title))
+	ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.ToWikiPageURL(form.Title))
 }
 
 func EditWiki(ctx *middleware.Context) {

+ 1 - 1
templates/repo/wiki/new.tmpl

@@ -12,7 +12,7 @@
         <input name="title" value="{{.title}}" autofocus required>
       </div>
       <div class="field">
-        <textarea id="edit-area" name="content" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{.RepoLink}}">{{.i18n.Tr "repo.wiki.welcome"}}</textarea>
+        <textarea id="edit-area" name="content" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{.RepoLink}}">{{.i18n.Tr "repo.wiki.welcome"}}</textarea required>
       </div>
       <div class="field">
         <input name="message" placeholder="{{.i18n.Tr "repo.wiki.default_commit_message"}}">

+ 18 - 0
templates/repo/wiki/view.tmpl

@@ -0,0 +1,18 @@
+{{template "base/head" .}}
+<div class="repository wiki view">
+	{{template "repo/header" .}}
+  <div class="ui container">
+    {{template "repo/sidebar" .}}
+    <div class="ui dividing header">
+      {{.Title}}
+      <div class="ui sub header">
+      	{{$timeSince := TimeSince .Author.When $.Lang}}
+      	{{.i18n.Tr "repo.wiki.last_commit_info" .Author.Name $timeSince | Safe}}
+      </div>
+    </div>
+		<div class="ui segment markdown">
+			{{.Content | Str2html}}
+		</div>
+	</div>
+</div>
+{{template "base/footer" .}}

Some files were not shown because too many files changed in this diff