Stash can throw 500 errors when loading the history of a file if the repository has a .mailmap file in its root and Stash is using Git 1.8.2 to 1.8.4 (on Linux or Windows).
This is because those versions of Git do not properly handle a .mailmap files if the file does not end with a newline: http://permalink.gmane.org/gmane.comp.version-control.git/232938.
The bug was introduced in Git 1.8.2, by the combination of:
- 086109, which adds the function read_mailmap_blob with the bug,
- and 8c473ce, which makes the Git executable look for a .mailmap file in the current HEAD (rather than the repository's root) on bare repositories.
The motivation for the change is described in more detail on 8c473ce.
A side effect of this bug is that any git rev-list command run with pretty printing and the following options %aN, %aE, %cN or %cE will fail with a segmentation fault. Those options are equivalent to %an (author name), %ae (author email), %cn (committer name) or %ce (committer email), but use the .mailmap information if it is available. Since loading the .mailmap file segmentation faults when the file is not terminated by a new line, the rev-list command fails with the same error.