make-last-commit-name.rkt
#lang racket/base

(require racket/runtime-path)
(define-runtime-path git-head-path ".git/refs/heads/master")
(define-runtime-path last-commit-name.rkt "last-commit-name.rkt")

(call-with-input-file git-head-path
  (lambda (ip)
    (call-with-output-file last-commit-name.rkt
      (lambda (op)
        (fprintf op "#lang racket/base

;; This file is automatically generated by make-last-commit-name.rkt.
;; Do not edit this file by hand.

(provide (all-defined-out))
(define git-head ~s)
"
(read-line ip)))
      #:exists 'replace)))