From f42a5c4eb0453cd33276e078cd7541b1ef25b2c4 Mon Sep 17 00:00:00 2001 From: Franck Bui-Huu Date: Tue, 12 Sep 2006 11:00:13 +0200 Subject: connect.c: finish_connect(): allow null pid parameter git_connect() can return 0 if we use git protocol for example. Users of this function don't know and don't care if a process had been created or not, and to avoid them to check it before calling finish_connect() this patch allows finish_connect() to take a null pid. And in that case return 0. [jc: updated function signature of git_connect() with a comment on its return value. ] Signed-off-by: Franck Bui-Huu Signed-off-by: Junio C Hamano --- cache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cache.h') diff --git a/cache.h b/cache.h index a53204f6d6..8d099979d9 100644 --- a/cache.h +++ b/cache.h @@ -359,7 +359,7 @@ struct ref { #define REF_HEADS (1u << 1) #define REF_TAGS (1u << 2) -extern int git_connect(int fd[2], char *url, const char *prog); +extern pid_t git_connect(int fd[2], char *url, const char *prog); extern int finish_connect(pid_t pid); extern int path_match(const char *path, int nr, char **match); extern int match_refs(struct ref *src, struct ref *dst, struct ref ***dst_tail, -- cgit v1.2.3