Squashed commit of the following:

commit 6807a0b57ac4e645ee55cff0e29b310cf544d727
Author: Hamish Ivey-Law <hamish.ivey.law@gmail.com>
Date:   Mon Jun 30 11:49:20 2014 +0200

    Don't print filename in commit message.

commit a529392287fab405c405cacfa265da687b556cbb
Author: Hamish Ivey-Law <hamish.ivey.law@gmail.com>
Date:   Mon Jun 30 02:26:59 2014 +0200

    Check that there's something to commit before trying.

commit 76d8766537afc7873efb25aafff1857bb0427d90
Author: Hamish Ivey-Law <hamish.ivey.law@gmail.com>
Date:   Mon Jun 30 02:01:25 2014 +0200

    Make git-annex-add-file take an argument.

commit 9d3c2b8575cff45b0810da9c2d92af086ec38c66
Author: Hamish Ivey-Law <hamish.ivey.law@gmail.com>
Date:   Mon Jun 30 02:00:50 2014 +0200

    Fix argument passing to git function.

commit 3750056b476eac11b09fbab20daefbcf3e33a85b
Author: Hamish Ivey-Law <hamish.ivey.law@gmail.com>
Date:   Mon Jun 30 01:39:31 2014 +0200

    Fixed some syntax errors.

commit baebe1c0dec66e0f1c35f0565da2ef39798bc98a
Author: Hamish Ivey-Law <hamish.ivey.law@gmail.com>
Date:   Mon Jun 30 01:17:19 2014 +0200

    Add advice to read-only-mode.

commit 919b494416df6b5a59663e5ea4deed64a5690852
Author: Hamish Ivey-Law <hamish.ivey.law@gmail.com>
Date:   Mon Jun 30 01:16:55 2014 +0200

    Refactor git commands and reversion.

commit 124e58311952f7ba2d3f2a07d6ddd3fd5d75cadc
Author: Hamish Ivey-Law <hamish.ivey.law@gmail.com>
Date:   Fri Jun 27 20:03:19 2014 +0200

    Removed incorrect truename code; only expand directories.

commit 0cb9c18f5dda11af6655a07428b7c8f7c16b9c9d
Author: Hamish Ivey-Law <hamish.ivey.law@gmail.com>
Date:   Thu Jun 26 00:22:23 2014 +0200

    Use truenames in lock/unlock-annexed-file.

commit 530b81049e1b1183d8d45c5e4bf243d1f3570dcf
Author: Hamish Ivey-Law <hamish.ivey.law@gmail.com>
Date:   Thu Jun 26 00:19:39 2014 +0200

    Make git-annex-add-file use file-truename.

commit 590cd750491b4f8ba50279a762011f96f1cdbec5
Author: Hamish Ivey-Law <hamish.ivey.law@gmail.com>
Date:   Thu Jun 26 00:16:56 2014 +0200

    Refactored the toggle-read-only advice.

commit 5d7addfb8fdf02ad39e65546c9fd497411144f44
Author: Hamish Ivey-Law <hamish.ivey.law@gmail.com>
Date:   Wed Jun 25 19:51:11 2014 +0200

    Factored out `buffer-file-name` not nil test.

commit 1129264507ea84a356cdcdc0b50eb3abebfef8da
Author: Hamish Ivey-Law <hamish.ivey.law@gmail.com>
Date:   Wed Jun 25 19:26:14 2014 +0200

    Explanatory comment.

commit 8c0e99bee05b67cd4051d1be1bde5497a694378b
Author: Hamish Ivey-Law <hamish.ivey.law@gmail.com>
Date:   Wed Jun 25 19:14:15 2014 +0200

    Use `buffer-file-truename` in advice.

commit 7617534fb91146e6b58117dc7a094684e875d265
Author: Hamish Ivey-Law <hamish.ivey.law@gmail.com>
Date:   Wed Jun 25 19:13:09 2014 +0200

    Guard against nil `buffer-file-name`.

commit 9907d6889ac0e892785cfbe7a1512ea10d8c081b
Author: Hamish Ivey-Law <hamish.ivey.law@gmail.com>
Date:   Wed Jun 25 19:01:04 2014 +0200

    Change function name.

commit 369dae4e61337d5f05da647a61cab86533fc2beb
Author: Hamish Ivey-Law <hamish.ivey.law@gmail.com>
Date:   Wed Jun 25 19:00:16 2014 +0200

    Test if we're in a Git repository without strings.

commit 58b910b31a426829392a4c2e8d7363c6cafe7db9
Author: Hamish Ivey-Law <hamish.ivey.law@gmail.com>
Date:   Wed Jun 25 18:58:37 2014 +0200

    Add function to find true filename of the buffer.

commit 4ffae51aba3b0c91bef7d4349a20d81357fdca7d
Author: Hamish Ivey-Law <hamish.ivey.law@gmail.com>
Date:   Wed Jun 25 18:54:27 2014 +0200

    Tidy whitespace and indentation.