Matthieu Moy <matthieu....@grenoble-inp.fr> writes: > This should be fixable from Git itself, by replacing the calls to > "unlink" with something like > > int unlink_or_chmod(...) { > if (unlink(...)) { > chmod(...); // give user write permission > return unlink(...); > } > }
I agree with the approach in principle, but I wonder if we want to contaminate the generic codepath with unlink_or_chmod(). Don't we want to have this #undef unlink int workaround_broken_unlink(...) { ... the same ... } in compat/broken-unlink.c and something like this #ifdef BROKEN_UNLINK #define unlink(x) workaround_broken_unlink(x) #endif in git-compat-util.h instead? That way, people on well behaving systems do not have to worry about clobbering errno and stuff, perhaps? -- 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