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

[PATCH] trivial fix for init-db

From
ASAaron Straus <aaron@merfinllc.com>
Date
Apr 18, 2005, 23:14 UTC
Message-ID
<20050418231435.GF8929@hydra>
This makes init-db work for common object database.
Signed-Off-By: Aaron Straus <aaron@merfinllc.com>
init-db.c: aa00fbb1b95624f6c30090a17354c9c08a6ac596
--- a/init-db.c
+++ b/init-db.c
@@ -24,7 +24,7 @@ int main(int argc, char **argv)
 	sha1_dir = getenv(DB_ENVIRONMENT);
 	if (sha1_dir) {
 		struct stat st;
-		if (!stat(sha1_dir, &st) < 0 && S_ISDIR(st.st_mode))
+		if (!stat(sha1_dir, &st) && S_ISDIR(st.st_mode))
 			return 0;
 		fprintf(stderr, "DB_ENVIRONMENT set to bad directory %s: ", sha1_dir);
 	}
Message 1 of 1 in “trivial fix for init-db”
  1. trivial fix for init-dbAaron Straus, Apr 18, 2005

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.