Jeff King <peff@xxxxxxxx> writes: > We also know S_ISDIR(st.st_mode) _before_ we actually mmap. So I was > tempted to simply check it beforehand, under the assumption that the > mmap cannot possibly work if we have a directory. But by doing it in the > error code path, then we _know_ we are not affecting the outcome, only > the error message. :) Well, even if your mmap() worked on a directory, having ~/.gitconfig as a directory is wrong in the first place, so... I think what you sent is good as-is, so let's go with them. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html