git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] refs.c: fix delete_ref_loose

From
Ronnie Sahlberg <sahlberg@google.com>
Date
Jun 13, 2014, 17:02 UTC
Message-ID
<1402678974-21799-1-git-send-email-sahlberg@google.com>

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.

Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
---
 wrapper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/wrapper.c b/wrapper.c
index c9605cd..740e193 100644
--- a/wrapper.c
+++ b/wrapper.c
@@ -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;
-- 
2.0.0.415.g8cd8cf8
Message 1 of 1 in “refs.c: fix delete_ref_loose”
  1. refs.c: fix delete_ref_looseRonnie Sahlberg, Jun 13, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.