To my defense, the lockfile API is used a little inconsitently in git.
Many places in git does a close(fd) and the call commit_locked_index(),
which will close the fd again.
I bet they did that so that the return status of close() could be checked
since commit_lock_file() doesn't currently check it.
-brandon