Skip to contentSkip to conversation

refs.c: fix delete_ref_loose

PATCH New Ronnie Sahlberg 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 refs.c: fix delete_ref_loose

Please use this to fixup the patch:
refs.c: add an err argument to delete_ref_loose

With this fix and the two previous ones the ref-transactions support in origin/pu passes all tests.

---
 wrapper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
wrapper.c +2 -2
index c9605cd..740e193 100644
@@ -430,8 +430,8 @@ int xmkstemp_mode(char *template, int mode)
 static int warn_if_unremovable(const char *op, const char *file, int rc)
 {
 	int err;
-	if (!rc || errno == ENOENT)
-		return 0;
+	if (rc >= 0 || errno == ENOENT)
+		return rc;
 	err = errno;
 	warning("unable to %s %s: %s", op, file, strerror(errno));
 	errno = err;
Signature · 1 line
2.0.0.415.g8cd8cf8