{"thread":{"id":"36909","subject":"[PATCH] refs.c: fix delete_ref_loose","startedAt":"2014-06-13T17:02:54Z","lastAt":"2014-06-13T17:02:54Z","messageCount":1,"participants":["Ronnie Sahlberg"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"244149","messageId":"1402678974-21799-1-git-send-email-sahlberg@google.com","threadId":"36909","inReplyTo":null,"subject":"[PATCH] refs.c: fix delete_ref_loose","fromName":"Ronnie Sahlberg","fromEmail":"sahlberg@google.com","sentAt":"2014-06-13T17:02:54Z","receivedAt":"2014-06-13T17:02:54Z","isPatch":true,"sender":{"key":"sahlberg@google.com","avatar":"https://avatars.githubusercontent.com/u/7320636?v=4"},"body":"Please use this to fixup the patch:\nrefs.c: add an err argument to delete_ref_loose\n\nWith this fix and the two previous ones the ref-transactions support in\norigin/pu passes all tests.\n\nSigned-off-by: Ronnie Sahlberg <sahlberg@google.com>\n---\n wrapper.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/wrapper.c b/wrapper.c\nindex c9605cd..740e193 100644\n--- a/wrapper.c\n+++ b/wrapper.c\n@@ -430,8 +430,8 @@ int xmkstemp_mode(char *template, int mode)\n static int warn_if_unremovable(const char *op, const char *file, int rc)\n {\n \tint err;\n-\tif (!rc || errno == ENOENT)\n-\t\treturn 0;\n+\tif (rc >= 0 || errno == ENOENT)\n+\t\treturn rc;\n \terr = errno;\n \twarning(\"unable to %s %s: %s\", op, file, strerror(errno));\n \terrno = err;\n-- \n2.0.0.415.g8cd8cf8\n"}]}