login
Header Space

 
 

Re: [PATCH 12/16] builtin-fetch--tool: extend "native-store" for use in cloning

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <skimo@...>
Cc: <git@...>, Junio C Hamano <junkio@...>
Date: Friday, May 18, 2007 - 6:52 pm

skimo@liacs.nl, Fri, May 18, 2007 21:25:01 +0200:

This code produces warning about possible uninitialized used of
single_force and not_for_merge. I used the patch below, but didn't
look into what the "all" does.

---
 builtin-fetch--tool.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/builtin-fetch--tool.c b/builtin-fetch--tool.c
index 12adb38..ebb49d9 100644
--- a/builtin-fetch--tool.c
+++ b/builtin-fetch--tool.c
@@ -273,7 +273,7 @@ static int fetch_native_store(FILE *fp,
 		int len;
 		char *cp;
 		char *local_name;
-		int single_force, not_for_merge;
+		int single_force = force, not_for_merge = 0;
 
 		for (cp = buffer; *cp && !isspace(*cp); cp++)
 			;
@@ -301,7 +301,7 @@ static int fetch_native_store(FILE *fp,
 		err |= append_fetch_head(fp,
 					 buffer, remote, cp, remote_nick,
 					 local_name, not_for_merge,
-					 verbose, force || single_force);
+					 verbose, single_force);
 	}
 	return err;
 }
-- 
1.5.2.rc3.83.gbbb0

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Second round of support for cloning submodules, Sven Verdoolaege, (Fri May 18, 3:34 pm)
Re: [PATCH 09/16] entry.c: optionally checkout submodules, Sven Verdoolaege, (Fri May 18, 6:03 pm)
Re: [PATCH 07/16] git-read-tree: take --submodules option, Sven Verdoolaege, (Fri May 18, 6:08 pm)
Re: [PATCH 07/16] git-read-tree: take --submodules option, Junio C Hamano, (Fri May 18, 11:59 pm)
Re: [PATCH 07/16] git-read-tree: take --submodules option, Sven Verdoolaege, (Sat May 19, 9:05 am)
Re: [PATCH 07/16] git-read-tree: take --submodules option, Shawn O. Pearce, (Sat May 19, 12:27 am)
Re: [PATCH 12/16] builtin-fetch--tool: extend "native-store"..., Alex Riesen, (Fri May 18, 6:52 pm)
[PATCH 01/16] Add dump-config, , (Fri May 18, 3:24 pm)
speck-geostationary