Git homedirs repository

From ICPC-Contest Control Standard

This page describes the way that ICPC-live is storing the contestants' home directories.

We store the home directories in a Revision Control System. By committing changes at regular intervals, an (almost) complete history of the home directories is created, which can also be queried for changes between different times. We use Git as RCS system, since it handles large amounts of data well. script

The script can be called with two different arguments:

  1. init initializes a new Git repository at the BASEDIR as configured in the script. This can take a few minutes if the directory is already populated with files, because it also deltifies and compresses the Git database.
  2. commit automatically commits any changes in the repository. The commit is tagged as Tag_HH_MM with HH:MM the time of the commit. This command is meant to be called at regular intervals from a looping script or Cron job.

The script also creates two files listing.txt and listing_full.txt in BASEDIR that contain a listing of all files with metadata such as permissions and modification times, which are not stored by Git. The second lists all files; the first excludes dot-files. These files are also versioned, so their diffs also provide a quick overview of which files have changed.


The plan is to setup Gitweb on a local webserver as an interface to query the Git repository.

This web interface can be browsed manually, but also be queried by passing parameters via the URL. The following parameters are most relevant:

  • a=<action> action to perform, see list below.
  • f=<filename> file name (with full path from base of repository)
  • hb=<tag> tag (or commit SHA1 hash) to apply to, unspecified means most recent (i.e. HEAD)
  • hbp=<tag> parent tag, can be used to specify original for diffs

Actions that can be specified (those most useful for automated queries):

  • blob_plain returns file at specified commit
  • blobdiff_plain returns diff of a file between two revisions (tags)
  • commitdiff_plain returns a diff of all changes between two revisions
  • tree browse repository tree (optionally specify subdirectory)

For example, to show the differences between a file at times 10:52 and now, use


The precise base URL prefix will probably change.

Alternative access

Alternatively to the Gitweb interface, since Git is a distributed RCS, it is easy to clone it to another computer or account (e.g. over SSH) and use your favourite tools to browse the repository, such as gitk.