Archive for the ‘Programming’ Category

GitPHP 0.2.4

GitPHP 0.2.4 is out. I’ve still been pretty busy, I apologize.

  • Chinese translation – thanks to seefan
  • Side-by-side diffs for blobdiff and commitdiff – based on work by Mattias Ulbrich and Tanguy Pruvot
  • Fix clone and push urls using ssh colon notation – thanks to mdevilz
  • Allow specifying hashbases by branch/tag name in URLs – previously you were required to specify the entire ref name, eg hb=refs/heads/master. Now you can just specify the head/tag name, eg hb=master.
  • Fix crash in blobdiff_plain when specifying hashbase without a hash – this prevented you from using urls with just a filename and hashbase id or ref name, which was supposed to find the right file hash automatically

Release is on the GitPHP page and bugs can be reported on the bugtracker.

GitPHP 0.2.3

I’ve released GitPHP 0.2.3. Unfortunately I’ve had a pretty busy couple months at work, so I didn’t really get to any of the enhancements that I intended to get to this release. 0.2.3 has several bugfixes that I wanted to get out, rather than delaying the release and making you wait for them.

  • Degrade gracefully when the system doesn’t have posix functions
    Previously there was a bug where the page crashed when trying to display the project owner on systems without the php posix module installed (windows systems, and several linux distributions). If you don’t have this module then the owner still won’t display unless you set the gitweb.owner config value or override it in projects.conf.php, but at least the page won’t stop rendering it.
  • Make the language setting a permanent cookie
    Previously, the language cookie was a session cookie, so when you came back to the site you had to change your language again. Now it’s a permanent cookie with a 1 year expiration.
  • Escape HTML in the title header
    Previously, commit messages weren’t escaped in the title bar (the gray bar with the commit message at the top of the page, below the nav), so commit messages with HTML in them caused weird things to happen. Now the HTML displays properly
  • Add attribution and link back to GitPHP page in the footer
    This is by request, I swear. If you don’t like it, I don’t mind if you delete it from the footer and go back to the old appearance.
  • Run javascript project livesearch after the user stops typing
    Previously the javascript livesearch on the project list ran after every letter you typed. This caused a severe performance hit on larger project lists, since the browser would churn through the huge list of projects many times in succession. Now it runs after the user stops typing.
  • Remove containing tag from object cache
    Previously an object’s containing tag was stored in the object cache. The containing tag is actually not immutable data, and so there are certain cases where caching this would cause the display to get out of sync. Now, this is no longer cached. I would suggest clearing your cache after upgrading to be safe.
  • Improve performance of projects with lots of tags or heads
    Previously there was a severe performance problem with projects with many tags or heads (hundreds). This was because it was attempting to load all tags and all their data into memory. For example, the git repo for the git program has almost 400 tags, and took almost 2 minutes to load any page. Now, it only loads the data for the tags it needs so it’s a lot better.
  • Clean up stylesheets
    Previously the stylesheet was a mess and was really difficult to read. I’ve cleaned it up, organized it, and broken it out into two separate stylesheets – a functional stylesheet (gitphp.css) which contains declarations needed for gitphp to layout and work properly, and a look and feel stylesheet (gitphpskin.css) which customizes the colors and styling. The stylesheet config option now controls the location of the skin stylesheet – so you can make a copy, customize the look and feel, and point the stylesheet config option at the new skin stylesheet. The config option has backwards compatibility to handle the fact that the stylesheet name changed but people may have the option pointing at the old single stylesheet from previous example configs.

As always, the release is available on the GitPHP page and bugs can be reported on the bugtracker.

GitPHP 0.2.2

I’ve released GitPHP 0.2.2. There are a number of neat enhancements in this release; you might have seen some running on the local copy on this site – javascript livesearch of the project list, ajax tree drilldown, choice of snapshot format, bugtracker linking, etc. Plus there are major enhancements on the backend, including the object cache described in a previous post, and built-in memcache support for all caching – just specify the memcache server(s) in the config and you’re good to go.

Full changelog:

  • Enhancements:
    • Atom feed support, thanks to Christian Weiske
    • Error pages now return proper HTTP error codes to avoid search engine indexing
    • Users can now choose the file format of snapshot they want, based on what’s supported by the system. The config value still controls the default for non-javascript users.
    • Directories in the config file no longer require you to specify the trailing slash
    • Overriding project settings (category, owner, description, clone url, etc) can now be done for all project listing methods – directory list, file list, and array list. Previously it could only be done with the array
    • The tree view can now be drilled down using AJAX
    • Memcache support
    • Support for linking bug numbers in commit messages to a bug tracker
    • Search box to search projects on the project list. This is a live search if you have javascript
    • Object cache, for caching immutable git data – more info on what this is and why you want it is here
    • Javascript is now minified to decrease its size
    • Clone/push urls on the project page are now links, thanks to Cory Thomas
    • Project owners are now read from the git config value gitweb.owner if set, thanks to Cory Thomas
  • Translations:
    • Russian, thanks to Aidsoid
    • German, thanks to Andy Tandler
  • Bugfixes:
    • Fix issue where commit tooltips didn’t escape HTML characters correctly
    • Project ages on the project list page now use a more accurate method to get the age
    • The default tmpdir, if not specified in the config, is read from the system/php config rather than hardcoding it. This also fixes an issue where the default tmpdir for windows was incorrect
    • Fix the default git binary for windows x64 installs
    • An error message now displays when the diff/git executable isn’t found or doesn’t work, rather than just failing silently

For those who are wondering about this post about a backwards incompatible change – the change to specify overrides for all project list formats does change the project config file (projects.conf.php) format slightly, but the code is backwards compatible and will continue to use your old project config file until you adjust it for the new changes.

As always, the release can be downloaded from the gitphp page and bugs can be reported on the bugtracker.

Return top