Thread (10 messages) flat view 10 messages, 1 author, 2016-06-15
DORMANTno replies

[PATCH 2/8] init-db.c: [RESEND] make init-db work with common objects

From: Zach Welch <hidden>
Date: 2016-06-15 22:41:53

This makes init-db work for common object database.

This patch applies on top of:
        [PATCH 0/8] init-db.c cleanup, add INDEX_FILE_DIRECTORY support
        [PATCH 1/8] init-db.c: [RESEND] remove redundant getenv call
 init-db.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
Signed-Off-By: Zach Welch <redacted>

Signed-Off-By: Aaron Straus <redacted>
Author: Aaron Straus [off-list ref]

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);
 	}
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help