gitphp.conf.defaults.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463
  1. <?php
  2. /**
  3. * GitPHP Config defaults
  4. *
  5. * Lists all the config options and their default values
  6. *
  7. * @author Christopher Han <xiphux@gmail.com>
  8. * @copyright Copyright (c) 2010 Christopher Han
  9. * @package GitPHP
  10. * @subpackage Config
  11. */
  12. /**
  13. * This file is not usable as an actual config file.
  14. * To use a config value you should copy the value
  15. * into gitphp.conf.php
  16. */
  17. throw new Exception('The defaults file should not be used as your config.');
  18. /*********************************************************
  19. * Projects
  20. */
  21. /*
  22. * projectroot
  23. * Full directory on server where projects are located
  24. */
  25. //$gitphp_conf['projectroot'] = '/pub/gitprojects/';
  26. /*
  27. * exportedonly
  28. * When listing all projects in the project root,
  29. * (not specifying any projects manually or using a project list file)
  30. * set this to true to only allow repositories with the
  31. * special file git-daemon-export-ok (see the git-daemon man page)
  32. */
  33. $gitphp_conf['exportedonly'] = false;
  34. /*********************************************************
  35. * Appearance
  36. */
  37. /*
  38. * locale
  39. * This is the default locale/language used in the interface.
  40. * The locale must exist in the locale/ directory
  41. */
  42. $gitphp_conf['locale'] = 'en_US';
  43. /*
  44. * title
  45. * The string that will be used as the page title
  46. * The variable '$gitphp_appstring' will expand to
  47. * the name (gitphp) and version
  48. * The variable '$gitphp_version' will expand to the
  49. * version number only
  50. */
  51. $gitphp_conf['title'] = "$gitphp_appstring";
  52. /*
  53. * homelink
  54. * This is the text of the link in the upper left corner
  55. * that takes you back to the project list.
  56. */
  57. $gitphp_conf['homelink'] = 'projects';
  58. /*
  59. * cloneurl
  60. * Sets the base clone url to display for a project.
  61. * This is the publicly-accessible url of the projectroot
  62. * that gets prepended to the project path to create the clone
  63. * url. It can be any format, for example:
  64. *
  65. * http://server.com/
  66. * ssh://server.com/git/
  67. * git://server.com/gitprojects/
  68. *
  69. * If left blank/commented, no clone url will display.
  70. */
  71. $gitphp_conf['cloneurl'] = 'http://localhost/git/';
  72. /*
  73. * pushurl
  74. * Sets the base push url to display for a project.
  75. * Works the same as cloneurl.
  76. */
  77. $gitphp_conf['pushurl'] = 'ssh://localhost/git/';
  78. /*
  79. * bugpattern
  80. * Sets the regular expression to use to find bug number
  81. * references in log messages. The pattern should have a
  82. * group that extracts just the bug ID to pass to the
  83. * bug tracker.
  84. * For example, '/#([0-9]+)/' will recognize any number
  85. * with a '#' in front of it, and groups the numeric part
  86. * only. Another common example is '/bug:([0-9]+)/' to
  87. * extract bug numbers with 'bug:' in front of them.
  88. */
  89. //$gitphp_conf['bugpattern'] = '/#([0-9]+)/';
  90. /*
  91. * bugurl
  92. * Sets the URL for the bug tracker. This URL must have
  93. * a backreference to the group in the bug pattern that
  94. * contains the ID. For example, ${1} uses the first
  95. * group.
  96. */
  97. //$gitphp_conf['bugurl'] = 'http://localhost/mantis/view.php?id=${1}';
  98. /*
  99. * self
  100. * This is the path to the script that will be inserted
  101. * in urls. If you leave this blank/commented the script
  102. * will try to guess the correct URL, but you can override
  103. * it here if it's not being guessed correctly.
  104. */
  105. $gitphp_conf['self'] = 'http://localhost/gitphp/';
  106. /*
  107. * stylesheet
  108. * Path to look and feel (skin) stylesheet
  109. */
  110. $gitphp_conf['stylesheet'] = 'gitphpskin.css';
  111. /*
  112. * javascript
  113. * Toggles on javascript features
  114. */
  115. $gitphp_conf['javascript'] = true;
  116. /*
  117. * googlejs
  118. * Toggles whether to use the Google Libraries API to
  119. * load javascript libraries, which takes advantage of the
  120. * speed and caching of Google's servers and content
  121. * delivery network.
  122. * http://developers.google.com/speed/libraries/
  123. * The libraries are served from Google's servers, which
  124. * means your users must have an internet connection,
  125. * so this may not be appropriate for closed intranets.
  126. * By enabling this you agree to Google's terms for their
  127. * library API.
  128. */
  129. $gitphp_conf['googlejs'] = false;
  130. /*********************************************************
  131. * Features
  132. */
  133. /*
  134. * compat
  135. * Set this to true to turn on compatibility mode. This will cause
  136. * GitPHP to rely more on the git executable for loading data,
  137. * which will bypass some of the limitations of PHP at the expense
  138. * of performance.
  139. * Turn this on if you are experiencing issues viewing data for
  140. * your projects.
  141. */
  142. $gitphp_conf['compat'] = false;
  143. /**
  144. * largeskip
  145. * When GitPHP is reading through the history for pages of the shortlog/log
  146. * beyond the first, it needs to read from the tip but skip a number of commits
  147. * for the previous pages. The more commits it needs to skip, the longer it takes.
  148. * Calling the git executable is faster when skipping a large number of commits,
  149. * ie reading a log page significantly beyond the first. This determines
  150. * the threshold at which GitPHP will fall back to using the git exe for the log.
  151. * Currently each log page shows 100 commits, so this would be calculated at
  152. * page number * 100. So for example at the default of 200, pages 0-2 would be
  153. * loaded natively and pages 3+ would fall back on the git exe.
  154. */
  155. $gitphp_conf['largeskip'] = 200;
  156. /*
  157. * uniqueabbrev
  158. * If this is turned on, when GitPHP abbreviates hashes, it will ensure
  159. * that the abbreviated hash is unique for the project, extending the
  160. * abbreviated hash if necessary until it becomes unique.
  161. * Searching through every single pack in the repository for collisions is a
  162. * performance intensive process that can slow down page loads. If you turn
  163. * this on, it's highly recommended to merge all of your existing packs into
  164. * a single pack using git gc --aggressive (or git repack -a -d).
  165. */
  166. $gitphp_conf['uniqueabbrev'] = false;
  167. /*
  168. * compressformat
  169. * Indicates what kind of compression will be done on the
  170. * snapshot archive. Recognized settings are:
  171. *
  172. * GITPHP_COMPRESS_BZ2 - create a tar.bz2 file (php must have bz2 support)
  173. * GITPHP_COMPRESS_GZ - create a tar.gz file (php must have gzip support)
  174. * GITPHP_COMPRESS_ZIP - create a zip file
  175. *
  176. * Any other setting, or no setting, will create uncompressed tar archives
  177. * If you choose a compression format and your php does not support it,
  178. * gitphp will fall back to uncompressed tar archives
  179. *
  180. * Note that users with javascript get to choose their snapshot format when
  181. * they request it, so this only applies to users without javascript or if
  182. * you turn the javascript setting off
  183. */
  184. $gitphp_conf['compressformat'] = GITPHP_COMPRESS_ZIP;
  185. /*
  186. * compresslevel
  187. * Sets the compression level for snapshots. Ranges from 1-9, with
  188. * 9 being the most compression but requiring the most processing
  189. * (bzip defaults to 4, gzip defaults to -1)
  190. */
  191. $gitphp_conf['compresslevel'] = 9;
  192. /*
  193. * geshi
  194. * Run blob output through geshi syntax highlighting
  195. * and line numbering
  196. */
  197. $gitphp_conf['geshi'] = true;
  198. /*
  199. * search
  200. * Set this to false to disable searching
  201. */
  202. $gitphp_conf['search'] = true;
  203. /*
  204. * filesearch
  205. * Set this to false to disable searching within files
  206. * (it can be resource intensive)
  207. */
  208. $gitphp_conf['filesearch'] = true;
  209. /*
  210. * filemimetype
  211. * Attempt to read the file's mimetype when displaying
  212. * (for example, displaying an image as an actual image
  213. * in a browser)
  214. * This requires either PHP >= 5.3.0, PECL fileinfo, or
  215. * Linux
  216. */
  217. $gitphp_conf['filemimetype'] = true;
  218. /*
  219. * abbreviateurl
  220. * Generates urls using abbreviated hashes instead of
  221. * full hashes.
  222. * Note that urls with abbreviated hashes are not safe
  223. * to be saved long term (eg bookmarks), as future objects
  224. * may be added to the repository that cause an abbreviated
  225. * hash to no longer be unique.
  226. * This option only takes effect with the 'compat' option
  227. * turned off.
  228. * Additionally, this option will automatically enable
  229. * 'uniqueabbrev', as an abbreviated hash must be unique
  230. * in order to resolve it to a full hash.
  231. */
  232. $gitphp_conf['abbreviateurl'] = false;
  233. /*
  234. * cleanurl
  235. * Uses clean, rest-style urls throughout gitphp.
  236. * This requires additional setup in your web server
  237. * to rewrite urls (mod_rewrite on Apache, HttpRewriteModule
  238. * on Nginx, etc). URLs must be rewritten to point
  239. * to index.php?q={query}.
  240. * For more instructions on how to set this up, see
  241. * http://www.gitphp.org/projects/gitphp/wiki/Clean_URLs
  242. */
  243. $gitphp_conf['cleanurl'] = false;
  244. /*
  245. * feedfilter
  246. * Sets a regular expression to use to filter commits out
  247. * of the project atom/rss feed. Commits that have a
  248. * commit message matching this pattern will be excluded.
  249. * For example, '/GIT_SILENT/' will exclude any commit
  250. * with the string GIT_SILENT in the commit message.
  251. */
  252. //$gitphp_conf['feedfilter'] = '/GIT_SILENT/';
  253. /*
  254. * showrestrictedprojects
  255. * By default, when user-based restrictions are enabled,
  256. * projects that are not available to the logged in user
  257. * will be hidden in the project list. Setting this option
  258. * will instead display these projects as disabled in the
  259. * project list.
  260. */
  261. $gitphp_conf['showrestrictedprojects'] = false;
  262. /*
  263. /*********************************************************
  264. * Executable/filesystem options
  265. * Important to check if you're running windows
  266. */
  267. /*
  268. * gitbin
  269. * Path to git binary
  270. * For example, /usr/bin/git on Linux
  271. * or C:\\Program Files\\Git\\bin\\git.exe on Windows
  272. * with msysgit. You can also omit the full path and just
  273. * use the executable name to search the user's $PATH.
  274. * Note: Versions of PHP below 5.2 have buggy handling of spaces
  275. * in paths. Use the 8.3 version of the filename if you're
  276. * having trouble, e.g. C:\\Progra~1\\Git\\bin\\git.exe
  277. */
  278. // Linux:
  279. $gitphp_conf['gitbin'] = 'git';
  280. // Windows (msysgit):
  281. $gitphp_conf['gitbin'] = 'C:\\Progra~1\\Git\\bin\\git.exe';
  282. /*
  283. * magicdb
  284. * Path to the libmagic db used to read mimetype
  285. * Only applies if filemimetype = true
  286. * You can leave this as null and let the system
  287. * try to find the database for you, but that method
  288. * is known to have issues
  289. * If the path is correct but it's still not working,
  290. * try removing the file extension if you have it on,
  291. * or vice versa
  292. */
  293. // Linux:
  294. $gitphp_conf['magicdb'] = '/usr/share/misc/magic';
  295. // Windows:
  296. $gitphp_conf['magicdb'] = 'C:\\wamp\\php\\extras\\magic';
  297. /*******************************************************
  298. * Cache options
  299. */
  300. /*
  301. * cache
  302. * Turns on template caching. If in doubt, leave it off
  303. * You will need to create a directory 'cache' and make it
  304. * writable by the server
  305. */
  306. $gitphp_conf['cache'] = false;
  307. /*
  308. * objectcache
  309. * Turns on object caching. This caches immutable pieces of
  310. * data from the git repository. You will need to create a
  311. * directory 'cache' and make it writable by the server.
  312. * This can be used in place of the template cache, or
  313. * in addition to it for the maximum benefit.
  314. */
  315. $gitphp_conf['objectcache'] = false;
  316. /*
  317. * cacheexpire
  318. * Attempts to automatically expire cache when a new commit renders
  319. * it out of date.
  320. * This is a good option for most users because it ensures the cache
  321. * is always up to date and users are seeing correct information,
  322. * although it is a slight performance hit.
  323. * However, if your commits are coming in so quickly that the cache
  324. * is constantly being expired, turn this off.
  325. */
  326. $gitphp_conf['cacheexpire'] = true;
  327. /*
  328. * cachelifetime
  329. * Sets how long a page will be cached, in seconds
  330. * If you are automatically expiring the cache
  331. * (see the 'cacheexpire' option above), then this can be set
  332. * relatively high - 3600 seconds (1 hour) or even longer.
  333. * -1 means no timeout.
  334. * If you have turned cacheexpire off because of too many
  335. * cache expirations, set this low (5-10 seconds).
  336. */
  337. $gitphp_conf['cachelifetime'] = 3600;
  338. /*
  339. * objectcachelifetime
  340. * Sets how long git objects will be cached, in seconds
  341. * The object cache only stores immutable objects from
  342. * the git repository, so there's no harm in setting
  343. * this to a high number. Set to -1 to never expire.
  344. */
  345. $gitphp_conf['objectcachelifetime'] = 86400;
  346. /*
  347. * objectcachecompress
  348. * Sets the size threshold at which objects will be compressed
  349. * when being stored into the object cache. Compression saves
  350. * cache space but adds a very slight decompression overhead.
  351. * Set to 0 to disable compression.
  352. */
  353. $gitphp_conf['objectcachecompress'] = 500;
  354. /*
  355. * memcache
  356. * Enables memcache support for caching data, instead of
  357. * Smarty's standard on-disk cache.
  358. * Only applies if cache = true or objectcache = true (or both)
  359. * Requires either the Memcached or Memcache PHP extensions.
  360. * This is an array of servers. Each server is specified as an
  361. * array.
  362. * Index 0 (required): The server hostname/IP
  363. * Index 1 (optional): The port, default is 11211
  364. * Index 2 (optional): The weight, default is 1
  365. */
  366. //$gitphp_conf['memcache'] = array(
  367. // array('127.0.0.1', 11211, 2),
  368. // array('memcacheserver1', 11211),
  369. // array('memcacheserver2')
  370. //);
  371. /*
  372. * objectmemory
  373. * If set, this will limit the number of git objects GitPHP
  374. * keeps in PHP's memory during execution, to this specific number.
  375. * This can be set if you have a low memory limit on your
  376. * webserver.
  377. * Please note that setting this too low will severely degrade
  378. * performance, as GitPHP will have to repeatedly load the same
  379. * objects off of the disk since the limit prevents them from
  380. * being kept in memory. It's strongly recommended that you
  381. * turn debug mode on and view the MemoryCache size on various
  382. * pages (in the debug output) to get a feel for the size of
  383. * your projects before setting this.
  384. * 0 means no limit.
  385. */
  386. $gitphp_conf['objectmemory'] = 0;
  387. /*******************************************************
  388. * Debugging options
  389. */
  390. /*
  391. * debug
  392. * Turns on extra warning messages
  393. * Not recommended for production systems, as it will give
  394. * way more info about what's happening than you care about, and
  395. * will screw up non-html output (rss, opml, snapshots, etc)
  396. */
  397. $gitphp_conf['debug'] = false;
  398. /*
  399. * benchmark
  400. * Turns on extra timestamp and memory benchmarking info
  401. * when debug mode is turned on. Generates lots of output.
  402. */
  403. $gitphp_conf['benchmark'] = false;