Louis-Alexandre Stuber <stub...@ensimag.grenoble-inp.fr> writes: > Matthieu Moy <matthieu....@grenoble-inp.fr> wrote: > >> I think you would want to error out if errno is not ENOENT. > > > Junio C Hamano <jch2...@gmail.com> wrote: > >> We might want to see why fopen() failed here. If it is because the >> file did not exist, great. But otherwise? > > > This file is always supposed to exist when the function is called > unless the user has manually deleted it (or a bug in our programs). > > Maybe we should just return an error if the file cannot be opened, > regardless the reason. We kept it like it is, with the default case, > because it was what our elders did, and that aborting because of > BISECT_TERMS is not good for backward compatibility. > > But then, in both cases, there is no reason to differenciate ENOENT. > Is that right ?
One thing that immediately comes to mind is when you (perhaps accidentally, or perhaps you were asked to) cd into somebody else's repository and take a look or help, the file exists but cannot be read by you and you get EPERM. That is very different from ENOENT, which is an expected error when you are not using a customized terms. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html