Thread (1 message) 1 message, 1 author, 2016-06-15
DORMANTno replies

[PATCH 5/9] http-push: Avoid calling setup_git_directory() twice

From: Nguyễn Thái Ngọc Duy <hidden>
Date: 2016-06-15 22:44:17
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
---
 http-push.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/http-push.c b/http-push.c
index 406270f..1dd78e8 100644
--- a/http-push.c
+++ b/http-push.c
@@ -2173,7 +2173,7 @@ int main(int argc, char **argv)
 	struct ref *ref;
 	char *rewritten_url = NULL;
 
-	setup_git_directory();
+	const char *prefix = setup_git_directory();
 
 	remote = xcalloc(sizeof(*remote), 1);
 
@@ -2375,7 +2375,7 @@ int main(int argc, char **argv)
 			commit_argv[3] = old_sha1_hex;
 			commit_argc++;
 		}
-		init_revisions(&revs, setup_git_directory());
+		init_revisions(&revs, prefix);
 		setup_revisions(commit_argc, commit_argv, &revs, NULL);
 		free(new_sha1_hex);
 		if (old_sha1_hex) {
-- 
1.5.4.2.281.g28d0e
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help